|
Parsing Engine | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanbikel.parser.Nonterminal
public class Nonterminal
Representation of all possible data present in a complex
nonterminal annotation: the base label, any augmentations and any index.
Not following the traditional object-oriented design principles, this class
is used strictly for representing the data present in a complex nonterminal,
but that data is easily manipulated by several methods of Treebank,
such as Treebank.parseNonterminal and
Treebank.addAugmentation.
Treebank.parseNonterminal(Symbol,Nonterminal),
Treebank.addAugmentation(Nonterminal,Symbol),
Treebank.removeAugmentation(Nonterminal,Symbol),
Treebank.containsAugmentation(Symbol,Symbol),
Treebank.getTraceIndex(Sexp,Nonterminal),
Treebank.stripAllButIndex(Symbol,Nonterminal),
Treebank.stripIndex(Symbol,Nonterminal),
Serialized Form| Field Summary | |
|---|---|
SexpList |
augmentations
A list of symbols representing any augmentations and delimiters. |
Symbol |
base
The unaugmented base nonterminal. |
int |
index
The index of the augmented nonterminal, or -1 if none was present. |
| Constructor Summary | |
|---|---|
Nonterminal()
Default constructor sets the base data member to be
null, the augmentations data member to be
a list with no elements and the index data member to be
-1. |
|
Nonterminal(Symbol base,
SexpList augmentations,
int index)
Sets the data members of this new object to the specified values |
|
| Method Summary | |
|---|---|
boolean |
subsumes(Nonterminal other)
Returns whether this nonterminal subsumes the specified nonterminal. |
String |
toString()
Returns a string representation of the nonterminal, identical the original nonterminal that was parsed to create this object. |
Symbol |
toSymbol()
Returns the symbol representing this complex nonterminal. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public Symbol base
public SexpList augmentations
public int index
| Constructor Detail |
|---|
public Nonterminal()
base data member to be
null, the augmentations data member to be
a list with no elements and the index data member to be
-1.
public Nonterminal(Symbol base,
SexpList augmentations,
int index)
| Method Detail |
|---|
public boolean subsumes(Nonterminal other)
other - the nonterminal to test for subsumption with this nonterminal
public String toString()
toString in class Objectpublic Symbol toSymbol()
|
Parsing Engine | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||