|
Fido Alpha 3.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fido.grammar.SentenceThread
Represents one possible linkage the grammar has found during incremental processing. Each or found in a grammar expression creates two new SentenceThreads, one for each possible outcome.
Each SentenceThread contains a GrammarStack where it stores open links for matching later in processing and a Vector of discovered Link classes.
Each thread contains an incremented counter as a name. Every new SentenceThread contains a different name, within the same parse.
GrammarStack
Constructor Summary | |
SentenceThread(java.lang.String name)
Creates a new SentenceThread instance. |
Method Summary | |
void |
addLink(Link newLink)
Adds a new Link class to the thread. |
boolean |
checkStack()
Asks the GrammarStack if its stack is empty. |
SentenceThread |
cloneSentenceThread(java.lang.String newName)
Creates a shallow copy of the SentenceThread. |
GrammarStack |
getGrammarStack()
Returns a reference to the GrammarStack. |
java.util.Vector |
getLinks()
Returns a reference to the Vector of links accumilated by this sentence thread. |
java.lang.String |
getThreadName()
Returns the name of the thead. |
void |
holdExpression(NodeExpression exp,
WordSense sense)
Puts the NodeExpression parameter, and associated WordSense, in the hold area of the GrammarStack. |
void |
pushHoldNode()
Asks the GrammarStack to push the node in the hold area to the top of the stack. |
WordSense |
traverseStack(java.lang.String str)
Asks the GrammarStack to look for an open link matching the name in the parameter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SentenceThread(java.lang.String name)
name
- Name of the thread.SentenceThreadFactory
Method Detail |
public java.util.Vector getLinks()
public GrammarStack getGrammarStack()
public void holdExpression(NodeExpression exp, WordSense sense)
exp
- NodeExpression to put in the hold area.sense
- WordSense associated with the grammar expression.GrammarStack.holdExpression(NodeExpression, WordSense)
public WordSense traverseStack(java.lang.String str)
str
- Name of the close link to look for.
GrammarStack.traverseStack(String)
public void pushHoldNode()
GrammarStack.push()
public boolean checkStack()
GrammarStack.isEmpty()
public void addLink(Link newLink)
newLink
- Link class to add.public java.lang.String getThreadName()
public SentenceThread cloneSentenceThread(java.lang.String newName)
|
Fido Alpha 3.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |