Parsing Engine

danbikel.parser.constraints
Class PartialLexTreeConstraintSet

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

public class PartialLexTreeConstraintSet
extends UnlexTreeConstraintSet

Constructs a set of PartialLexTreeConstraints for a given tree.


Field Summary
 
Fields inherited from class danbikel.parser.constraints.UnlexTreeConstraintSet
leaves, list, root, size
 
Constructor Summary
PartialLexTreeConstraintSet()
          Constructs an empty constraint set.
PartialLexTreeConstraintSet(Sexp tree)
          Constructs a set of PartialLexTreeConstraint objects forming a tree structure from the specified syntactic tree.
 
Method Summary
protected  void buildConstraintSet(Sexp tree)
          Builds the constraint tree from the specified unlexicalized parse tree.
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

PartialLexTreeConstraintSet

public PartialLexTreeConstraintSet()
Constructs an empty constraint set.


PartialLexTreeConstraintSet

public PartialLexTreeConstraintSet(Sexp tree)
Constructs a set of PartialLexTreeConstraint objects forming a tree structure from the specified syntactic tree. The specified tree is lexicalized using a head finder.

Parameters:
tree - the syntactic tree from which to construct a tree of constraints
Method Detail

buildConstraintSet

protected void buildConstraintSet(Sexp tree)
Builds the constraint tree from the specified unlexicalized parse tree. 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.