java.lang.Object
marf.Storage.StorageManager
marf.Classification.Classification
marf.Classification.Stochastic.Stochastic
marf.Classification.Stochastic.MaxProbabilityClassifier
- All Implemented Interfaces:
- marf.Classification.IClassification, marf.Storage.IStorageManager, java.io.Serializable
- public class MaxProbabilityClassifier
- extends Stochastic
Maximum Probability Classification Module.
Originally came with the LangIdentApp NLP application
of Serguei Mokhov.
$Id: MaxProbabilityClassifier.java,v 1.19 2005/08/13 23:09:37 susan_fan Exp $
- Since:
- 0.3.0
- Version:
- $Revision: 1.19 $
| Methods inherited from class marf.Storage.StorageManager |
backSynchronizeObject, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, 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 |
serialVersionUID
private static final long serialVersionUID
- For serialization versioning.
When adding new members or make other structural
changes regenerate this number with the
serialver tool that comes with JDK.
- Since:
- 0.3.0.4
- See Also:
- Constant Field Values
oStatisticalEstimator
protected marf.Stats.StatisticalEstimators.StatisticalEstimator oStatisticalEstimator
- Local reference to some instance of a statistical
estimator for probability computation.
oAvailLanguages
protected java.util.Vector oAvailLanguages
- A collection of available natural languages.
MaxProbabilityClassifier
public MaxProbabilityClassifier(marf.Stats.StatisticalEstimators.StatisticalEstimator poStatisticalEstimator)
- NLP constructor that takes directly a statistical estimator.
MaxProbabilityClassifier
public MaxProbabilityClassifier(marf.FeatureExtraction.IFeatureExtraction poFeatureExtraction)
- Implements Classification API.
TODO: fix setting of data memvers as in MaxProbabilityClassifier(StatisticalEstimator).
init
public void init(marf.Stats.StatisticalEstimators.StatisticalEstimator poStatisticalEstimator)
- Initializes the classifier with all member variables.
train
public boolean train()
throws marf.Classification.ClassificationException
- Performs training of underlying statistical estimator
and goes through restore/dump cycle to save the available
languages. Implements Classification API.
- Specified by:
train in interface marf.Classification.IClassification- Overrides:
train in class Stochastic
classify
public boolean classify()
throws marf.Classification.ClassificationException
- Performs language classification.
Implements Classification API.
- Specified by:
classify in interface marf.Classification.IClassification- Overrides:
classify in class Stochastic
getMARFSourceCodeRevision
public static java.lang.String getMARFSourceCodeRevision()
- Retrieves class' revision.