|
MaltParser 1.0.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.maltparser.parser.guide.predmodel.CombinedPredictionModel
public class CombinedPredictionModel
The combined prediction guide model combines the transition and all output columns into one class sets (the same behavior as MaltParser 0.4).
Field Summary | |
---|---|
protected ClassTable |
classCodeTable
|
protected FeatureVector |
features
|
protected Guide |
guide
|
protected InstanceModel |
model
|
protected String |
modelName
|
Constructor Summary | |
---|---|
CombinedPredictionModel(Guide guide)
Constructs a combined prediction guide model. |
Method Summary | |
---|---|
void |
addInstance(ParserAction parserAction)
|
void |
finalize()
|
void |
finalizeSentence(Sentence sentence,
DependencyGraph dependencyGraph)
|
ClassTable |
getClassCodeTable()
Returns the all combined class table |
SingleMaltConfiguration |
getConfiguration()
|
FeatureVector |
getFeatures()
Returns the feature vector |
File |
getFile(String suffix)
|
InputStreamReader |
getInputStreamReader(String suffix)
|
String |
getModelName()
|
OutputStreamWriter |
getOutputStreamWriter(String suffix)
|
int |
getParserMode()
|
ParsingAlgorithm |
getParsingAlgorithm()
|
protected void |
initClassCodeTable()
Initialize the class code table. |
protected void |
initFeatures()
Initialize the feature vector and reads the feature specification file according to the --guide-features option or reads the default feature model
specification for current parsing algorithm. |
protected void |
initModel()
Initialize instance guide model according to the --guide-data_split_column . |
void |
noMoreInstances()
|
boolean |
predict()
|
boolean |
predictFromKBestList()
|
protected void |
setGuide(Guide guide)
Sets a Guide object |
protected void |
setModelName(String modelName)
Sets the model name |
String |
toString()
|
void |
update()
|
void |
updateCardinality()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Guide guide
protected String modelName
protected FeatureVector features
protected ClassTable classCodeTable
protected InstanceModel model
Constructor Detail |
---|
public CombinedPredictionModel(Guide guide) throws MaltChainedException
guide
- a Guide object
MaltChainedException
Method Detail |
---|
public void addInstance(ParserAction parserAction) throws MaltChainedException
addInstance
in interface GuideModel
MaltChainedException
public void finalizeSentence(Sentence sentence, DependencyGraph dependencyGraph) throws MaltChainedException
finalizeSentence
in interface GuideModel
MaltChainedException
public void noMoreInstances() throws MaltChainedException
noMoreInstances
in interface GuideModel
MaltChainedException
public void finalize() throws MaltChainedException
finalize
in interface GuideModel
finalize
in class Object
MaltChainedException
public boolean predict() throws MaltChainedException
predict
in interface GuideModel
MaltChainedException
public boolean predictFromKBestList() throws MaltChainedException
predictFromKBestList
in interface PredictionModel
MaltChainedException
public void update() throws MaltChainedException
update
in interface PredictionModel
MaltChainedException
public void updateCardinality() throws MaltChainedException
updateCardinality
in interface PredictionModel
MaltChainedException
public String getModelName()
getModelName
in interface GuideModel
protected void setModelName(String modelName)
modelName
- the model namepublic FeatureVector getFeatures()
protected void initFeatures() throws MaltChainedException
--guide-features
option or reads the default feature model
specification for current parsing algorithm.
MaltChainedException
public ClassTable getClassCodeTable()
AllCombinedClassTable
protected void initClassCodeTable() throws MaltChainedException
MaltChainedException
AllCombinedClassTable
protected void initModel() throws MaltChainedException
--guide-data_split_column
. If the option
is empty, when initialize a single model. Otherwise, a data split model (which will split the training instance
according to a feature)
MaltChainedException
public OutputStreamWriter getOutputStreamWriter(String suffix) throws MaltChainedException
getOutputStreamWriter
in interface GuideModel
MaltChainedException
public InputStreamReader getInputStreamReader(String suffix) throws MaltChainedException
getInputStreamReader
in interface GuideModel
MaltChainedException
public File getFile(String suffix) throws MaltChainedException
getFile
in interface GuideModel
MaltChainedException
public SingleMaltConfiguration getConfiguration() throws MaltChainedException
getConfiguration
in interface GuideModel
MaltChainedException
public ParsingAlgorithm getParsingAlgorithm()
getParsingAlgorithm
in interface GuideModel
protected void setGuide(Guide guide)
guide
- a Guide objectpublic int getParserMode() throws MaltChainedException
getParserMode
in interface GuideModel
MaltChainedException
public String toString()
toString
in class Object
|
MaltParser 1.0.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |