|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.international.morph.MorphoFeatures
public class MorphoFeatures
Holds a set of morphosyntactic features for a given surface form
Field Summary | |
---|---|
protected String |
altTag
|
protected Map<MorphoFeatureSpecification.MorphoFeatureType,String> |
fSpec
|
static String |
KEY_VAL_DELIM
|
Constructor Summary | |
---|---|
MorphoFeatures()
|
|
MorphoFeatures(MorphoFeatures other)
|
Method Summary | |
---|---|
void |
addFeature(MorphoFeatureSpecification.MorphoFeatureType feat,
String val)
|
MorphoFeatures |
fromTagString(String str)
Assumes that the tag string has been formed using a call to getTag(). |
String |
getAltTag()
An alternate tag form than the one produced by getTag(). |
String |
getTag(String baseTag)
Build a POS tag consisting of a base category plus inflectional features. |
String |
getValue(MorphoFeatureSpecification.MorphoFeatureType feat)
|
boolean |
hasFeature(MorphoFeatureSpecification.MorphoFeatureType feat)
|
int |
numActiveFeatures()
|
int |
numFeatureMatches(MorphoFeatures other)
|
void |
setAltTag(String tag)
|
String |
toString()
values() returns the values in the order in which they are declared. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String KEY_VAL_DELIM
protected final Map<MorphoFeatureSpecification.MorphoFeatureType,String> fSpec
protected String altTag
Constructor Detail |
---|
public MorphoFeatures()
public MorphoFeatures(MorphoFeatures other)
Method Detail |
---|
public void addFeature(MorphoFeatureSpecification.MorphoFeatureType feat, String val)
public boolean hasFeature(MorphoFeatureSpecification.MorphoFeatureType feat)
public String getValue(MorphoFeatureSpecification.MorphoFeatureType feat)
public int numFeatureMatches(MorphoFeatures other)
public int numActiveFeatures()
public String getTag(String baseTag)
baseTag
-
public void setAltTag(String tag)
public String getAltTag()
public MorphoFeatures fromTagString(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 String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |