Class HeadFeaturedConstituent

java.lang.Object
  extended byConstituent
      extended byAugmentedConstituent
          extended byHeadFeaturedConstituent
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:

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.
 
Fields inherited from class AugmentedConstituent
features
 
Fields inherited from class Constituent
category
 
Constructor Summary
HeadFeaturedConstituent(Symbol category, FeatureSet feats)
          Create a new HeadFeaturedConstituent with the given attributes (and not a head constituent).
HeadFeaturedConstituent(Symbol category, FeatureSet feats, boolean head)
          Create a new HeadFeaturedConstituent with the given attributes.
 
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 AugmentedConstituent
copyWithBindings, getFeatures, unifyWith
 
Methods inherited from class Constituent
getCategory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

head

boolean head
Flag true if this AugmentedConstituent is the head of a rule.

Constructor Detail

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).

Method Detail

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