|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.uzh.ifi.attempto.chartparser.Category
public abstract class Category
This class represents a grammatical category.
Field Summary | |
---|---|
protected FeatureMap |
featureMap
The feature map of the category. |
protected java.lang.String |
name
The name of the category. |
static java.lang.String[] |
specialCategories
This static array contains all category names that denote special categories. |
Constructor Summary | |
---|---|
Category()
|
Method Summary | |
---|---|
void |
addNegFeatureMap(FeatureMap fm)
Adds a negative feature map in the case of backward references, or does nothing for all other categories. |
void |
addPosFeatureMap(FeatureMap fm)
Adds a positive feature map in the case of backward references, or does nothing for all other categories. |
boolean |
canUnify(Category category)
This method detects whether this category can unify with the given category. |
Category |
deepCopy()
Creates a deep copy of this category. |
boolean |
equals(java.lang.Object obj)
|
StringRef |
getFeature(java.lang.String featureName)
Returns a feature value. |
FeatureMap |
getFeatureMap()
Returns the map of features of this category. |
java.util.Set<java.lang.String> |
getFeatureNames()
Returns the used feature names within the feature map. |
java.util.Collection<StringRef> |
getFeatureValues()
Returns the used feature values within the feature map. |
java.lang.String |
getName()
Returns the name of the category. |
java.util.List<FeatureMap> |
getNegFeatureMaps()
This method returns the list of negative feature maps for backward references, or null for all other categories. |
java.util.List<FeatureMap> |
getPosFeatureMaps()
This method returns the list of positive feature maps for backward references, or null for all other categories. |
protected abstract java.lang.String |
getType()
This method returns the type of the category. |
boolean |
isSimilar(Category c)
This methods checks whether two categories are similar. |
boolean |
isSpecialCategory()
Returns true if this category is a special category. |
void |
setFeature(java.lang.String featureName,
java.lang.String featureValue)
Sets a feature. |
void |
setFeature(java.lang.String featureName,
StringRef featureValue)
Sets a feature. |
void |
skolemize()
Skolemizes the feature values of this category. |
boolean |
subsumes(Category c)
This method returns true if this category subsumes (in other words "is more general than") the given category, or false otherwise. |
abstract java.lang.String |
toString()
|
void |
tryToUnify(Category c)
Tries to unify this category with another category. |
void |
unify(Category c)
Unifies this category with another category. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] specialCategories
protected java.lang.String name
protected FeatureMap featureMap
Constructor Detail |
---|
public Category()
Method Detail |
---|
protected abstract java.lang.String getType()
public java.lang.String getName()
public boolean isSpecialCategory()
public FeatureMap getFeatureMap()
public java.util.List<FeatureMap> getPosFeatureMaps()
public java.util.List<FeatureMap> getNegFeatureMaps()
public void addPosFeatureMap(FeatureMap fm)
fm
- The positive feature map to be added.public void addNegFeatureMap(FeatureMap fm)
fm
- The negative feature map to be added.public void setFeature(java.lang.String featureName, StringRef featureValue)
featureName
- The feature namefeatureValue
- The string reference that points to the value of the feature.public void setFeature(java.lang.String featureName, java.lang.String featureValue)
featureName
- The feature namefeatureValue
- The value of the feature.public StringRef getFeature(java.lang.String featureName)
featureName
- The name of the feature.
public void unify(Category c) throws UnificationFailedException
c
- The category to be unified with this category.
UnificationFailedException
- If unification fails.public void tryToUnify(Category c) throws UnificationFailedException
c
- The category to be unified with this category.
UnificationFailedException
- If unification fails.public boolean canUnify(Category category)
category
- The category for the unification check.
public boolean isSimilar(Category c)
c
- The category for which similarity with this category should be checked.
public boolean subsumes(Category c)
c
- The category for which it is checked whether this category subsumes it.
public void skolemize()
public java.util.Set<java.lang.String> getFeatureNames()
public java.util.Collection<StringRef> getFeatureValues()
public Category deepCopy()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public abstract java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |