marf.nlp.Parsing
Class ProbabilisticParser
java.lang.Object
marf.Storage.StorageManager
marf.nlp.Parsing.ProbabilisticParser
- All Implemented Interfaces:
- java.io.Serializable, IStorageManager
public class ProbabilisticParser
- extends StorageManager
TODO: document and refactor
$Id: ProbabilisticParser.java,v 1.24 2005/06/16 19:58:57 mokhov Exp $
- Since:
- 0.3.0
- Version:
- $Revision: 1.24 $
- Author:
- Serguei Mokhov
- See Also:
- Serialized Form
Methods inherited from class marf.Storage.StorageManager |
dump, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, restore, 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 |
ProbabilisticParser
public ProbabilisticParser(java.lang.String pstrGrammarFilename)
ProbabilisticParser
public ProbabilisticParser(java.io.StreamTokenizer poStreamTokenizer)
ProbabilisticParser
public ProbabilisticParser()
parse
public boolean parse()
throws java.io.IOException
- Throws:
java.io.IOException
dumpBackPointersContents
public void dumpBackPointersContents()
dumpParseMatrix
public void dumpParseMatrix()
train
public boolean train()
throws StorageException
- Throws:
StorageException
dumpParseTree
public void dumpParseTree()
dumpParseTree
public void dumpParseTree(int piLevel,
int i,
int j,
int A)
- Initial level of S non-terminal should be 0.
indent
protected void indent(int piTabSize)
getSentencePart
protected java.lang.String getSentencePart(int i,
int j)
setStreamTokenizer
public void setStreamTokenizer(java.io.StreamTokenizer poStreamTokenizer)
backSynchronizeObject
public void backSynchronizeObject()
- Description copied from class:
StorageManager
- Must to be overridden by the modules that use object serialization
with the generic implementation of
restore()
. By default
this method is unimplemented.
- Overrides:
backSynchronizeObject
in class StorageManager
- See Also:
StorageManager.restore()
getMARFSourceCodeRevision
public static java.lang.String getMARFSourceCodeRevision()
- Retrieves class' revision.
- Returns:
- revision string