|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--marf.Storage.StorageManager
|
+--marf.Classification.Classification
|
+--marf.Classification.Stochastic.Stochastic
|
+--marf.Classification.Stochastic.MaxProbabilityClassifier
Maximum Probability Classification Module.
Originally came with the LangIdentApp NLP application of Serguei Mokhov. $Id: MaxProbabilityClassifier.java,v 1.13 2005/05/09 16:38:12 mokhov Exp $
| Field Summary | |
protected java.util.Vector |
oAvailLanguages
A collection of available natural languages. |
protected marf.Stats.StatisticalEstimators.StatisticalEstimator |
oStatisticalEstimator
Local reference to some instance of a statistical estimator for probability computation. |
| Fields inherited from class marf.Classification.Classification |
oFeatureExtraction, oResultSet, oTrainingSet |
| Fields inherited from class marf.Storage.StorageManager |
iCurrentDumpMode, oObjectToSerialize, strFilename |
| Fields inherited from interface marf.Storage.IStorageManager |
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_HTML, DUMP_SQL, DUMP_XML, INTERFACE_CODE_REVISION, sastrExtensionsMap |
| Constructor Summary | |
MaxProbabilityClassifier(marf.FeatureExtraction.FeatureExtraction poFeatureExtraction)
Implements Classification API. |
|
MaxProbabilityClassifier(marf.Stats.StatisticalEstimators.StatisticalEstimator poStatisticalEstimator)
NLP constructor that takes directly a statistical estimator. |
|
| Method Summary | |
boolean |
classify()
Performs language classification. |
static java.lang.String |
getRevision()
Retrieves class' revision. |
void |
init(marf.Stats.StatisticalEstimators.StatisticalEstimator poStatisticalEstimator)
Initializes the classifier with all member variables. |
boolean |
train()
Performs training of underlying statistical estimator and goes through restore/dump cycle to save the available languages. |
| Methods inherited from class marf.Classification.Stochastic.Stochastic |
dump, getResult, restore |
| Methods inherited from class marf.Classification.Classification |
getResultSet, getTrainingSetFilename |
| Methods inherited from class marf.Storage.StorageManager |
backSynchronizeObject, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, restoreBinary, restoreCSV, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected marf.Stats.StatisticalEstimators.StatisticalEstimator oStatisticalEstimator
protected java.util.Vector oAvailLanguages
| Constructor Detail |
public MaxProbabilityClassifier(marf.Stats.StatisticalEstimators.StatisticalEstimator poStatisticalEstimator)
poStatisticalEstimator - statistical estimator to usepublic MaxProbabilityClassifier(marf.FeatureExtraction.FeatureExtraction poFeatureExtraction)
poFeatureExtraction - FeatureExtraction module reference| Method Detail |
public void init(marf.Stats.StatisticalEstimators.StatisticalEstimator poStatisticalEstimator)
poStatisticalEstimator - statistical estimator to use
java.lang.IllegalArgumentException - if poStatisticalEstimator is null
public boolean train()
throws ClassificationException
train in class Stochastictrue
ClassificationException - should there be a problem with dump/restoreTrainingSet
public boolean classify()
throws ClassificationException
classify in class Stochastictrue if classification was successful; false otherwise
ClassificationException - if there was a problem with I/O
or if there are no available languagespublic static java.lang.String getRevision()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||