|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--Arc
Functions as a word arc and generates a finished constituent. Stores a rule to match, the point up to which components have been matched, and the constituents that match them. Also has a rule associated with it to store the syntactic information and interpretation of the constituent.
| Constructor Summary | |
Arc(Rule newRule)
Creates an arc using a rule. |
|
| Method Summary | |
Arc |
addConstituent(Constituent cons)
Put a new constituent into a copy of this arc. |
boolean |
canAccept(Constituent cons)
Check if this arc will accept some constituent as its next element. |
boolean |
complete()
Check if this rule is complete. |
Phrase |
getConstituent(PrologEngine engine)
Get the finished constituent of this arc. |
java.lang.String |
toString()
Spit the string of this arc out-- debugging purposes. |
boolean |
virtual()
Check if this arc is virtual or not. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Arc(Rule newRule)
newRule - the rule to use.
java.lang.RuntimeException - for malformed rule.| Method Detail |
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean virtual()
public boolean canAccept(Constituent cons)
cons - the constituent to check.
public Arc addConstituent(Constituent cons)
cons - the constituent to add.
java.lang.RuntimeException - if the constituent is against the rules.public boolean complete()
public Phrase getConstituent(PrologEngine engine)
engine - the prolog engine-- we use prolog to check out the relationship between
the two.
java.lang.RuntimeException - if not complete.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||