|
MaltParser 1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.maltparser.parser.guide.Guide
public class Guide
The guide is used by a parsing algorithm to predict the next parser action during parsing and to add a instance to the training instance set during learning.
| Constructor Summary | |
|---|---|
Guide(SingleMaltConfiguration configuration,
ParsingAlgorithm parsingAlgorithm)
Constructs a guide. |
|
| Method Summary | |
|---|---|
void |
addInstance(ParserAction parserAction)
Used by the parsing algorithm for adding a instance to the training instance set during learning. |
void |
finalize()
Used for cleaning up the guide models and learner objects. |
void |
finalizeSentence(Sentence sentence,
DependencyGraph dependencyGraph)
Used when a sentence has been processed during learning. |
SingleMaltConfiguration |
getConfiguration()
Returns the current MaltParser configuration object |
File |
getFile(String suffix)
|
InputStreamReader |
getInputStreamReader(String suffix)
|
String |
getModelName()
|
OutputStreamWriter |
getOutputStreamWriter(String suffix)
|
int |
getParserMode()
|
ParsingAlgorithm |
getParsingAlgorithm()
Returns the parsing algorithm |
Class<?> |
getPredictionStrategy()
Returns a prediction strategy object (also know as a guide model) |
void |
initPredictionStrategy()
Initialize prediction strategy (also know as a guide model) |
void |
noMoreInstances()
Used when all training data has been processed during learning. |
boolean |
predict()
Predicts the next parser action during parsing. |
boolean |
predictFromKBestList()
|
void |
setConfiguration(SingleMaltConfiguration configuration)
Sets the current MaltParser configuration object |
void |
setParsingAlgorithm(ParsingAlgorithm parsingAlgorithm)
Sets the parsing algorithm that use the guide to predict the next parser action during parsing and to add a instance during learning. |
String |
toString()
|
void |
updateCardinality()
Updates all the features with latest cardinality (number of distinct values for a particular feature) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Guide(SingleMaltConfiguration configuration,
ParsingAlgorithm parsingAlgorithm)
throws MaltChainedException
configuration - the current MaltParserConfiguration objectparsingAlgorithm - the parsing algorithm that uses the guide
MaltChainedException| Method Detail |
|---|
public void addInstance(ParserAction parserAction)
throws MaltChainedException
addInstance in interface GuideModelparserAction - the current parser action.
MaltChainedException
public void finalizeSentence(Sentence sentence,
DependencyGraph dependencyGraph)
throws MaltChainedException
finalizeSentence in interface GuideModelsentence - the current sentencedependencyGraph - the current dependency graph
MaltChainedException
public void noMoreInstances()
throws MaltChainedException
noMoreInstances in interface GuideModelMaltChainedException
public void finalize()
throws MaltChainedException
finalize in interface GuideModelfinalize in class ObjectMaltChainedException
public boolean predict()
throws MaltChainedException
predict in interface GuideModelMaltChainedException
public boolean predictFromKBestList()
throws MaltChainedException
MaltChainedException
public void updateCardinality()
throws MaltChainedException
MaltChainedExceptionpublic Class<?> getPredictionStrategy()
public void initPredictionStrategy()
throws MaltChainedException
MaltChainedExceptionpublic ParsingAlgorithm getParsingAlgorithm()
getParsingAlgorithm in interface GuideModelpublic void setParsingAlgorithm(ParsingAlgorithm parsingAlgorithm)
parsingAlgorithm - the parsing algorithm that use the guidepublic SingleMaltConfiguration getConfiguration()
getConfiguration in interface GuideModelpublic void setConfiguration(SingleMaltConfiguration configuration)
configuration - the current MaltParser configuration object
public String getModelName()
throws MaltChainedException
getModelName in interface GuideModelMaltChainedException
public OutputStreamWriter getOutputStreamWriter(String suffix)
throws MaltChainedException
getOutputStreamWriter in interface GuideModelMaltChainedException
public InputStreamReader getInputStreamReader(String suffix)
throws MaltChainedException
getInputStreamReader in interface GuideModelMaltChainedException
public File getFile(String suffix)
throws MaltChainedException
getFile in interface GuideModelMaltChainedException
public int getParserMode()
throws MaltChainedException
getParserMode in interface GuideModelMaltChainedExceptionpublic String toString()
toString in class Object
|
MaltParser 1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||