|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectup.Backpointer
public class Backpointer
A backpointer to be used in CKY parsing. A backpointer specifies a recipe for how to build a tree. It consists of a rule, which defines a tree of depth 1, and up to two references to other backpointers, which recursively define the immediate subtrees.
| Constructor Summary | |
|---|---|
Backpointer(BinaryRule rule,
Backpointer pointerL,
Backpointer pointerR)
Create a new backpointer based on a binary rule. |
|
Backpointer(PreterminalRule rule)
Create a new backpointer based on a preterminal rule. |
|
Backpointer(UnaryRule rule,
Backpointer pointer)
Create a new backpointer based on a unary rule. |
|
| Method Summary | |
|---|---|
Tree |
extract(Grammar grammar)
Return the tree specified by this backpointer. |
Backpointer |
getPointerL()
Returns the backpointer for the left subtree. |
Backpointer |
getPointerR()
Returns the backpointer for the right subtree. |
Rule |
getRule()
Returns the rule associated with this backpointer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Backpointer(PreterminalRule rule)
rule - a preterminal rule
public Backpointer(UnaryRule rule,
Backpointer pointer)
rule - a unary rulepointer - a backpointer to the subtree
public Backpointer(BinaryRule rule,
Backpointer pointerL,
Backpointer pointerR)
rule - a binary rulepointerL - a backpointer for the left subtreepointerR - a backpointer for the right subtree| Method Detail |
|---|
public Rule getRule()
public Backpointer getPointerL()
null in
case no such backpointer is specifiedpublic Backpointer getPointerR()
null in
case no such backpointer is specifiedpublic Tree extract(Grammar grammar)
grammar - a grammar
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||