Class HeadFeaturedConstituent
java.lang.Object
Constituent
AugmentedConstituent
HeadFeaturedConstituent
- All Implemented Interfaces:
- Unifiable
- public class HeadFeaturedConstituent
- extends AugmentedConstituent
An HeadFeaturedConstituent of a parse represents a syntactic element
augmented with feature information.
It consists of:
- the syntactic category
- a set of features
- a binary flag that indicates if the constituent is the head of a rule
Note we don't override copyWithBindings() in this class.
That's because the head feature is irrelevent once we're processing
with the chart parser (but it might be confusing to see constituents
lose their HEAD marker). And if the HEAD marker was needed in later
stages, then we'd need to preserve it by overiding the copy method.
Field Summary |
(package private) boolean |
head
Flag true if this AugmentedConstituent is the head of a rule. |
Method Summary |
boolean |
isHead()
Returns true if this AugmentedConstituent is the head of a rule. |
java.lang.String |
toString()
Returns the printable representation of this HeadFeaturedConstituent as a
String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
head
boolean head
- Flag true if this AugmentedConstituent is the head of a rule.
HeadFeaturedConstituent
public HeadFeaturedConstituent(Symbol category,
FeatureSet feats,
boolean head)
- Create a new HeadFeaturedConstituent with the given attributes.
HeadFeaturedConstituent
public HeadFeaturedConstituent(Symbol category,
FeatureSet feats)
- Create a new HeadFeaturedConstituent with the given attributes (and not
a head constituent).
isHead
public boolean isHead()
- Returns true if this AugmentedConstituent is the head of a rule.
toString
public java.lang.String toString()
- Returns the printable representation of this HeadFeaturedConstituent as a
String.
- Overrides:
toString
in class AugmentedConstituent