cc.mallet.types
Class FeatureConjunction
java.lang.Object
cc.mallet.types.FeatureConjunction
- All Implemented Interfaces:
- java.io.Serializable
public class FeatureConjunction
- extends java.lang.Object
- implements java.io.Serializable
- See Also:
- Serialized Form
Constructor Summary |
FeatureConjunction(Alphabet dictionary,
int[] features)
|
FeatureConjunction(Alphabet dictionary,
int[] features,
boolean[] negations)
|
FeatureConjunction(java.lang.String name,
Alphabet dictionary,
int[] features,
boolean[] negations)
|
FeatureConjunction(java.lang.String name,
Alphabet dictionary,
int[] features,
boolean[] negations,
boolean checkSorted)
|
FeatureConjunction(java.lang.String name,
Alphabet dictionary,
int[] features,
boolean[] negations,
boolean checkSorted,
boolean copyFeatures,
boolean copyNegations)
If negations[i] is true, insist that the feature has non-zero
value; if false, insist that it has zero value. |
Method Summary |
void |
addTo(AugmentableFeatureVector fv)
|
void |
addTo(AugmentableFeatureVector fv,
double value)
|
void |
addTo(AugmentableFeatureVector fv,
double value,
FeatureSelection fs)
|
static boolean |
featuresOverlap(Alphabet dictionary,
int feature1,
int feature2)
|
static int[] |
getFeatureIndices(Alphabet dictionary,
java.lang.String featureConjunctionName)
|
int |
getIndex()
|
static java.lang.String |
getName(Alphabet dictionary,
int[] features)
|
static java.lang.String |
getName(Alphabet dictionary,
int[] features,
boolean[] negations)
|
static java.lang.String |
getName(Alphabet dictionary,
int feature1,
int feature2)
|
static boolean |
isValidConjunction(int[] features)
|
boolean |
satisfiedBy(FeatureVector fv)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FeatureConjunction
public FeatureConjunction(java.lang.String name,
Alphabet dictionary,
int[] features,
boolean[] negations,
boolean checkSorted,
boolean copyFeatures,
boolean copyNegations)
- If negations[i] is true, insist that the feature has non-zero
value; if false, insist that it has zero value. Note: Does not
check to make sure that it hasn't already been added.
If negations[] is null, then assume all negations[i] are true.
FeatureConjunction
public FeatureConjunction(java.lang.String name,
Alphabet dictionary,
int[] features,
boolean[] negations,
boolean checkSorted)
FeatureConjunction
public FeatureConjunction(java.lang.String name,
Alphabet dictionary,
int[] features,
boolean[] negations)
FeatureConjunction
public FeatureConjunction(Alphabet dictionary,
int[] features,
boolean[] negations)
FeatureConjunction
public FeatureConjunction(Alphabet dictionary,
int[] features)
isValidConjunction
public static boolean isValidConjunction(int[] features)
getName
public static java.lang.String getName(Alphabet dictionary,
int[] features,
boolean[] negations)
getName
public static java.lang.String getName(Alphabet dictionary,
int[] features)
featuresOverlap
public static boolean featuresOverlap(Alphabet dictionary,
int feature1,
int feature2)
getName
public static java.lang.String getName(Alphabet dictionary,
int feature1,
int feature2)
getFeatureIndices
public static int[] getFeatureIndices(Alphabet dictionary,
java.lang.String featureConjunctionName)
satisfiedBy
public boolean satisfiedBy(FeatureVector fv)
getIndex
public int getIndex()
addTo
public void addTo(AugmentableFeatureVector fv,
double value,
FeatureSelection fs)
addTo
public void addTo(AugmentableFeatureVector fv,
double value)
addTo
public void addTo(AugmentableFeatureVector fv)