|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.classify.feature.Feature
de.fu_berlin.ties.classify.feature.DefaultFeature
public class DefaultFeature
Default implementation of the
Feature
class. Instances of this
class are immutable and thus thread-safe.
Constructor Summary | |
---|---|
DefaultFeature(String rep)
Creates a new instance, without storing a comment. |
|
DefaultFeature(String rep,
String myComment)
Creates a new instance, setting the strength to 1.0. |
|
DefaultFeature(String rep,
String myComment,
float myStrength)
Creates a new instance. |
Method Summary | |
---|---|
String |
getRepresentation()
Returns the representation of this feature, to be used for classification. |
float |
getStrength()
Returns a strength value for this feature. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class de.fu_berlin.ties.classify.feature.Feature |
---|
equals, getComment, getFullRepresentation, getFullRepresentation, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultFeature(String rep)
rep
- the representation of this feature; or null
to
create a comment-only featurepublic DefaultFeature(String rep, String myComment)
rep
- the representation of this feature; or null
to
create a comment-only featuremyComment
- a comment on this feature or the features to follow;
might be null
public DefaultFeature(String rep, String myComment, float myStrength)
rep
- the representation of this feature; or null
to
create a comment-only featuremyComment
- a comment on this feature or the features to follow;
might be null
myStrength
- The strenght of this feature -- higher values might
indicate more important or more frequent featuresMethod Detail |
---|
public String getRepresentation()
getRepresentation
in class Feature
null
if this feature
contains only a commentpublic float getStrength()
This method is non-public because it should only be accessed through
FeatureVector.strength(Feature)
to allow feature vectors to
modify the strenghts of the stored features.
getStrength
in class Feature
public String toString()
toString
in class Feature
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |