|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectmarf.Storage.StorageManager
marf.Stats.StatisticalEstimators.StatisticalEstimator
Implements generic Statistical Estimator routines. Must be subclasses by concrete implemenations of statistical estimators.
$Id: StatisticalEstimator.java,v 1.29 2006/02/11 20:36:56 mokhov Exp $
| Field Summary | |
protected ProbabilityTable |
oProbabilityTable
Probabilities table to perform estimation on. |
protected NLPStreamTokenizer |
oStreamTokenizer
Stream tokenizer for NLP processing to get word and non-word tokens from. |
| Fields inherited from class marf.Storage.StorageManager |
bDumpOnNotFound, iCurrentDumpMode, oObjectToSerialize, strFilename |
| Fields inherited from interface marf.Stats.StatisticalEstimators.IStatisticalEstimator |
MARF_INTERFACE_CODE_REVISION |
| Fields inherited from interface marf.Storage.IStorageManager |
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_HTML, DUMP_SQL, DUMP_XML, MARF_INTERFACE_CODE_REVISION, STORAGE_FILE_EXTENSIONS |
| Constructor Summary | |
StatisticalEstimator()
Default constructor creates a new probability table based on language with the default filename. |
|
| Method Summary | |
void |
backSynchronizeObject()
Updates the reference to the probabilities table for future serialization after restoration. |
void |
dumpCSV()
Not implemented. |
void |
dumpXML()
Not implemented. |
java.lang.String |
getFilename()
Sets the default filename for dumps as e.g. |
java.lang.String |
getLanguage()
Retrieves current language. |
static java.lang.String |
getMARFSourceCodeRevision()
Retrieves class' revision. |
ProbabilityTable |
getProbabilityTable()
Retrieves current probabilities table. |
NLPStreamTokenizer |
getStreamTokenizer()
Retrieves current stream tokenizer. |
double |
p()
N-gram-based probability classification. |
java.lang.String |
resetFilename()
Resets the internal filename to the default and returns it. |
void |
restoreCSV()
Not implemented. |
void |
restoreXML()
Not implemented. |
void |
setLanguage(java.lang.String pstrLang)
Allows alteration of the current language being processed. |
void |
setStreamTokenizer(NLPStreamTokenizer poStreamTokenizer)
Sets desired stream tokenizer. |
boolean |
train()
Every estimator needs to implement its specific training method. |
| Methods inherited from class marf.Storage.StorageManager |
clone, dump, dumpBinary, dumpGzipBinary, dumpHTML, dumpSQL, enableDumpOnNotFound, equals, getDefaultExtension, getDefaultExtension, getDumpMode, hashCode, restore, restoreBinary, restoreGzipBinary, restoreHTML, restoreSQL, setDumpMode, setFilename, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected ProbabilityTable oProbabilityTable
protected NLPStreamTokenizer oStreamTokenizer
| Constructor Detail |
public StatisticalEstimator()
NLP#getLanguage(),
getFilename()| Method Detail |
public final double p()
p in interface IStatisticalEstimatorpublic boolean train()
train in interface IStatisticalEstimatortrue if training was successfulpublic void backSynchronizeObject()
backSynchronizeObject in class StorageManagerStorageManager.backSynchronizeObject()
public void dumpCSV()
throws StorageException
dumpCSV in interface IStorageManagerdumpCSV in class StorageManagerNotImplementedException
StorageException - never thrownStorageManager.dump()
public void dumpXML()
throws StorageException
dumpXML in interface IStorageManagerdumpXML in class StorageManagerNotImplementedException
StorageException - never thrownStorageManager.dump()
public void restoreCSV()
throws StorageException
restoreCSV in interface IStorageManagerrestoreCSV in class StorageManagerNotImplementedException
StorageException - never thrownStorageManager.restore()
public void restoreXML()
throws StorageException
restoreXML in interface IStorageManagerrestoreXML in class StorageManagerNotImplementedException
StorageException - never thrownStorageManager.restore()public final void setStreamTokenizer(NLPStreamTokenizer poStreamTokenizer)
IStatisticalEstimator
setStreamTokenizer in interface IStatisticalEstimatorpoStreamTokenizer - NLPStreamTokenizer or a derivative to use for tokensIStatisticalEstimator.setStreamTokenizer(marf.nlp.util.NLPStreamTokenizer)public NLPStreamTokenizer getStreamTokenizer()
IStatisticalEstimator
getStreamTokenizer in interface IStatisticalEstimatorIStatisticalEstimator.getStreamTokenizer()public ProbabilityTable getProbabilityTable()
IStatisticalEstimator
getProbabilityTable in interface IStatisticalEstimatorIStatisticalEstimator.getProbabilityTable()public final void setLanguage(java.lang.String pstrLang)
IStatisticalEstimator
setLanguage in interface IStatisticalEstimatorpstrLang - desired languageIStatisticalEstimator.setLanguage(java.lang.String)public final java.lang.String getLanguage()
IStatisticalEstimator
getLanguage in interface IStatisticalEstimatorIStatisticalEstimator.getLanguage()public final java.lang.String resetFilename()
getFilename()public final java.lang.String getFilename()
nlp.StatisticalEstimators.Smoothing.WittenBell.1.en.gzbin.
More generally, <h;estimator/smoothing>h;.<h;ngram-model>h;.<h;lang>h;.gzbin
getFilename in class StorageManagerStorageManager.getFilename()public static java.lang.String getMARFSourceCodeRevision()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||