Parsing Engine

danbikel.parser.constraints
Class LexTreeConstraintSet

java.lang.Object
  extended by java.util.AbstractCollection
      extended by danbikel.parser.constraints.UnlexTreeConstraintSet
          extended by danbikel.parser.constraints.LexTreeConstraintSet
All Implemented Interfaces:
ConstraintSet, Iterable, Collection

public class LexTreeConstraintSet
extends UnlexTreeConstraintSet

Represents a set of constraints that correspond to a specific lexicalized parse tree, for use when the bottom-up parsing algorithm needs to generate only the analyses that are consistent with a particular lexicalized tree. Accordingly, the individual Constraint objects in this set form an isomorphic tree structure.

See Also:
LexTreeConstraint

Field Summary
 
Fields inherited from class danbikel.parser.constraints.UnlexTreeConstraintSet
leaves, list, root, size
 
Constructor Summary
LexTreeConstraintSet()
          Constructs a new, empty set of constraints.
LexTreeConstraintSet(Sexp tree)
          Constructs a new set of constraints according to a lexicalized version of the specified unlexicalized tree.
 
Method Summary
protected  void buildConstraintSet(Sexp tree)
          Builds the constraint tree from a lexicalized version of the specified unlexicalized parse tree (exicalization performed by the current head finder).
static void main(String[] args)
          Test driver for this class.
 
Methods inherited from class danbikel.parser.constraints.UnlexTreeConstraintSet
collectNodes, constraintSatisfying, findAtLeastOneSatisfying, findNoViolations, hasTreeStructure, isViolatedBy, iterator, leaves, root, size, toString
 
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

LexTreeConstraintSet

public LexTreeConstraintSet()
Constructs a new, empty set of constraints.


LexTreeConstraintSet

public LexTreeConstraintSet(Sexp tree)
Constructs a new set of constraints according to a lexicalized version of the specified unlexicalized tree. Lexicalization performed by the current head finder.

Parameters:
tree - the lexicalized tree for which to construct a constaint set
Method Detail

buildConstraintSet

protected void buildConstraintSet(Sexp tree)
Builds the constraint tree from a lexicalized version of the specified unlexicalized parse tree (exicalization performed by the current head finder). As a necessary side-effect, the UnlexTreeConstraintSet.root and UnlexTreeConstraintSet.leaves data members will be set/populated by this method.

Overrides:
buildConstraintSet in class UnlexTreeConstraintSet
Parameters:
tree - the tree from which to build this constraint set

main

public static void main(String[] args)
Test driver for this class.

Parameters:
args -

Parsing Engine

Author: Dan Bikel.