|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectup.DefaultTreeHandler
up.GrammarExtractor
public class GrammarExtractor
Extract a PCFG from a stream of trees.
Constructor Summary | |
---|---|
GrammarExtractor()
Constructs a new handler. |
Method Summary | |
---|---|
void |
exit()
Notifies the successor of this handler about the end of the stream. |
Grammar |
getGrammar()
Returns the extracted grammar. |
void |
init()
Notifies the successor of this handler about the start of the stream. |
void |
next(Tree tree)
Notifies the successor of this handler about the specified tree. |
Methods inherited from class up.DefaultTreeHandler |
---|
getSuccessor, setSuccessor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GrammarExtractor()
Method Detail |
---|
public Grammar getGrammar()
public void init()
DefaultTreeHandler
init
in interface TreeHandler
init
in class DefaultTreeHandler
public void next(Tree tree)
DefaultTreeHandler
next
in interface TreeHandler
next
in class DefaultTreeHandler
tree
- the tree about which the successor of this handler is to be
notifiedpublic void exit()
DefaultTreeHandler
exit
in interface TreeHandler
exit
in class DefaultTreeHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |