danbikel.parser.constraints
Class LexTreeConstraintSet
java.lang.Object
java.util.AbstractCollection
danbikel.parser.constraints.UnlexTreeConstraintSet
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
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 interface java.util.Collection |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray |
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
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
-
Author: Dan Bikel.