|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.mff.procasor.parsingTools.parser.Parser
The class where runs parsing tools. Parser translates the sentence into parse tree. Manages all user's communication with lingsvistic tools (we call them Parser Tools). Parsing tools are connected together with system of pipes, which we call the PipeLine. Sentence is subsequently processed by parsing tools - PipeLine. The final result of these operations is stored in xml format. Parser creates all instances of Parsing Tools, connect them into the sequence of pipes and processes which together form the PipeLine.
Field Summary | |
boolean |
isRunning
true if the Pipeline is running |
boolean |
isStarting
true if the Pipeline is starting |
int |
running
0 - the pipeline is not running, 1 - the pipeline is running |
Constructor Summary | |
Parser(cz.cuni.mff.procasor.gui.ParserMessageSender pmSender)
Constructor Creates instance of InfoQueue for recieving InfoRecord instances from Parsing tools. |
Method Summary | |
int |
close()
Called when nothing is to be done and we want to clost the PipeLine Close input and output pipes of the PipeLine, we close the input stream, parsing tools recognize EOF signal on the input of their pipes and shutdown. |
int |
init()
Description: Building the PipeLine. |
java.lang.String |
parse(java.lang.String sentence)
This method is used by user to process the sentence. |
int |
restart()
Method close the PipeLine and creates another. |
protected void |
setPipeLine()
Creates apropriate filters for reading and writing data from the pipes, which are connected directly to the PipeLine. |
protected void |
setTools()
Method for building the PipeLine inside the Parser. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int running
public boolean isRunning
public boolean isStarting
Constructor Detail |
public Parser(cz.cuni.mff.procasor.gui.ParserMessageSender pmSender)
Method Detail |
public int init() throws cz.cuni.mff.procasor.parsingTools.parser.parseExceptions.StartingProcessException
cz.cuni.mff.procasor.parsingTools.parser.parseExceptions.StartingProcessException
- if initialization failspublic java.lang.String parse(java.lang.String sentence) throws cz.cuni.mff.procasor.parsingTools.parser.parseExceptions.RunningProcessException
cz.cuni.mff.procasor.parsingTools.parser.parseExceptions.RunningProcessException
cz.cuni.mff.procasor.parsingTools.parser.parseExceptions.ParseException
protected void setTools() throws cz.cuni.mff.procasor.parsingTools.parser.parseExceptions.ParseException
cz.cuni.mff.procasor.parsingTools.parser.parseExceptions.ParseException
protected void setPipeLine()
public int close() throws cz.cuni.mff.procasor.parsingTools.parser.parseExceptions.RunningProcessException
cz.cuni.mff.procasor.parsingTools.parser.parseExceptions.RunningProcessException
public int restart() throws cz.cuni.mff.procasor.parsingTools.parser.parseExceptions.RunningProcessException, cz.cuni.mff.procasor.parsingTools.parser.parseExceptions.StartingProcessException
cz.cuni.mff.procasor.parsingTools.parser.parseExceptions.RunningProcessException
- - error while shutting down the parser (PipeLine)
cz.cuni.mff.procasor.parsingTools.parser.parseExceptions.StartingProcessException
- - error while initializating new parser (PipeLine)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |