public class MorphoFeatures
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
altTag |
protected java.util.Map<MorphoFeatureSpecification.MorphoFeatureType,java.lang.String> |
fSpec |
static java.lang.String |
KEY_VAL_DELIM |
Constructor and Description |
---|
MorphoFeatures() |
MorphoFeatures(MorphoFeatures other) |
Modifier and Type | Method and Description |
---|---|
void |
addFeature(MorphoFeatureSpecification.MorphoFeatureType feat,
java.lang.String val) |
MorphoFeatures |
fromTagString(java.lang.String str)
Assumes that the tag string has been formed using a call to getTag().
|
java.lang.String |
getAltTag()
An alternate tag form than the one produced by getTag().
|
java.lang.String |
getTag(java.lang.String baseTag)
Build a POS tag consisting of a base category plus inflectional features.
|
java.lang.String |
getValue(MorphoFeatureSpecification.MorphoFeatureType feat) |
boolean |
hasFeature(MorphoFeatureSpecification.MorphoFeatureType feat) |
int |
numActiveFeatures() |
int |
numFeatureMatches(MorphoFeatures other) |
void |
setAltTag(java.lang.String tag) |
java.lang.String |
toString()
values() returns the values in the order in which they are declared.
|
public static final java.lang.String KEY_VAL_DELIM
protected final java.util.Map<MorphoFeatureSpecification.MorphoFeatureType,java.lang.String> fSpec
protected java.lang.String altTag
public MorphoFeatures()
public MorphoFeatures(MorphoFeatures other)
public void addFeature(MorphoFeatureSpecification.MorphoFeatureType feat, java.lang.String val)
public boolean hasFeature(MorphoFeatureSpecification.MorphoFeatureType feat)
public java.lang.String getValue(MorphoFeatureSpecification.MorphoFeatureType feat)
public int numFeatureMatches(MorphoFeatures other)
public int numActiveFeatures()
public java.lang.String getTag(java.lang.String baseTag)
baseTag
- public void setAltTag(java.lang.String tag)
public java.lang.String getAltTag()
public MorphoFeatures fromTagString(java.lang.String str)
Note that this method returns a new MorphoFeatures object. As a result, it behaves like a static method, but is non-static so that subclasses can override this method.
str
- public java.lang.String toString()
toString
in class java.lang.Object