|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.washington.cs.knowitall.extractor.conf.BooleanFeatureSet<T>
T
- public class BooleanFeatureSet<T>
Represents a set of boolean feature functions that can be applied to objects of type T
.
Each feature is represented as a Predicate
object, and has a String name.
Constructor Summary | |
---|---|
BooleanFeatureSet(java.util.Map<java.lang.String,com.google.common.base.Predicate<T>> givenFeatures)
Constructs a new feature set from the given features. |
Method Summary | |
---|---|
java.util.SortedMap<java.lang.String,java.lang.Boolean> |
featurize(T object)
Returns a feature representation of the given object. |
boolean[] |
featurizeToBool(T object)
Returns the feature representation of object as an array of booleans. |
double[] |
featurizeToDouble(T object)
Returns the feature representation of object as an array of doubles. |
java.util.List<java.lang.String> |
getFeatureNames()
Returns the feature names as an ImmutableList, sorted using the default String comparator. |
java.util.List<com.google.common.base.Predicate<T>> |
getFeatures()
Returns the features as an ImmutableList, sorted using the default String comparator on the features' names. |
int |
getNumFeatures()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BooleanFeatureSet(java.util.Map<java.lang.String,com.google.common.base.Predicate<T>> givenFeatures)
givenFeatures
- Method Detail |
---|
public java.util.SortedMap<java.lang.String,java.lang.Boolean> featurize(T object)
object
-
public double[] featurizeToDouble(T object)
object
-
public boolean[] featurizeToBool(T object)
object
-
public java.util.List<java.lang.String> getFeatureNames()
public java.util.List<com.google.common.base.Predicate<T>> getFeatures()
public int getNumFeatures()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |