com.sun.labs.minion.lextax
Class MemoryTaxonomy
java.lang.Object
com.sun.labs.minion.lextax.Taxonomy
com.sun.labs.minion.lextax.MemoryTaxonomy
public class MemoryTaxonomy
- extends Taxonomy
Fields inherited from class com.sun.labs.minion.lextax.Taxonomy |
ABBREVIATION_OF, CHILDREN, ENTAILS, INSTANCE_OF, INV_ABBREVIATION_OF, INV_ENTAILS, INV_INSTANCE_OF, INV_KIND_OF, INV_MISSPELLING_OF, INV_MORPH_OF, INV_NICKNAME_OF, INV_SENSE_OF, INV_VARIANT_OF, KIND_OF, LINKCHARS, MISSPELLING_OF, MORPH_OF, NICKNAME_OF, NLINKS, NLINKTYPES, PARENTS, SENSE_OF, TOP, TOP_NAME, VARIANT_OF |
Method Summary |
void |
classify(java.lang.String t)
|
ConceptEntry |
classify(Word w,
java.util.ArrayList seen,
int d)
|
void |
dump(java.lang.String indexDir,
java.io.File file)
Dumps the taxonomy to the given file. |
void |
setLexicon(Lexicon l)
|
boolean |
shouldIgnore(Token token)
Simple test for the taxonomy to decided if it should ignore
the token for classification purposes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
morph
protected MorphEngine morph
state
protected MorphState state
lex
protected Lexicon lex
dict
protected MemoryDictionary dict
topID
protected java.lang.Integer topID
top
protected ConceptEntry top
logTag
protected static java.lang.String logTag
MemoryTaxonomy
public MemoryTaxonomy()
MemoryTaxonomy
public MemoryTaxonomy(Lexicon l)
setLexicon
public void setLexicon(Lexicon l)
- Parameters:
l
-
classify
public void classify(java.lang.String t)
classify
public ConceptEntry classify(Word w,
java.util.ArrayList seen,
int d)
shouldIgnore
public boolean shouldIgnore(Token token)
- Simple test for the taxonomy to decided if it should ignore
the token for classification purposes.
- Parameters:
token
- an instnce of Token that has been created when parsing a document
- Returns:
- a boolean indicating whether or not to ignore the token for classification purposes
dump
public void dump(java.lang.String indexDir,
java.io.File file)
throws java.io.IOException
- Dumps the taxonomy to the given file.
- Throws:
java.io.IOException