The Encog Project

org.encog.nlp.lexicon
Class EncogLexicon

java.lang.Object
  extended by org.encog.nlp.lexicon.EncogLexicon

public class EncogLexicon
extends java.lang.Object

Note: This class is part of the Encog Natural Language Processing(NLP) package. This package is still under heavy construction, and will not be considered stable until Encog 3.0.

Author:
jheaton

Field Summary
static java.lang.String WORD_TYPE_ACTION
           
static java.lang.String WORD_TYPE_DESCRIPTION
           
static java.lang.String WORD_TYPE_NODE
           
static java.lang.String WORD_TYPE_QUESTION_EMBED
           
static java.lang.String WORD_TYPE_QUESTION_SIMPLE
           
static java.lang.String WORD_TYPE_SPLIT
           
 
Constructor Summary
EncogLexicon(ORMSession session)
           
 
Method Summary
 void addFix(java.lang.String value, boolean pre, WordType type)
           
 void addType(java.lang.String word, WordType wordType)
           
 void addType(Word word, WordType type)
           
 void addWordType(java.lang.String str)
           
 long countWordList()
           
 java.util.Collection<Fix> determineWordFixes(Word word)
           
 Lemma findLemma(java.lang.String str)
           
 Lemma findLemma(Word word)
           
 Word findWord(java.lang.String word)
           
 java.util.Map<java.lang.String,Fix> getPrefixes()
           
 java.util.Map<java.lang.String,Fix> getSuffixes()
           
 WordType getWordType(java.lang.String code)
           
 boolean hasWordType(Word usedWord, Lemma lemma, WordType wordType)
           
 java.util.Iterator<Lemma> iterateLemmaList()
           
 java.util.Iterator iterateWordList(int start, int size)
           
 void loadCache()
           
 Lemma obtainLemma(java.lang.String str)
           
 Lemma obtainLemmaForRoot(Word root)
           
 Word obtainWord(java.lang.String word)
           
 void registerGutenbergCount(java.lang.String word, int count)
           
 void registerWikiCount(java.lang.String word, int count)
           
 Word removeFix(Word word, Fix fix)
           
 void setupWord(Word word)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WORD_TYPE_NODE

public static final java.lang.String WORD_TYPE_NODE
See Also:
Constant Field Values

WORD_TYPE_ACTION

public static final java.lang.String WORD_TYPE_ACTION
See Also:
Constant Field Values

WORD_TYPE_DESCRIPTION

public static final java.lang.String WORD_TYPE_DESCRIPTION
See Also:
Constant Field Values

WORD_TYPE_SPLIT

public static final java.lang.String WORD_TYPE_SPLIT
See Also:
Constant Field Values

WORD_TYPE_QUESTION_SIMPLE

public static final java.lang.String WORD_TYPE_QUESTION_SIMPLE
See Also:
Constant Field Values

WORD_TYPE_QUESTION_EMBED

public static final java.lang.String WORD_TYPE_QUESTION_EMBED
See Also:
Constant Field Values
Constructor Detail

EncogLexicon

public EncogLexicon(ORMSession session)
Method Detail

loadCache

public void loadCache()

findWord

public Word findWord(java.lang.String word)

findLemma

public Lemma findLemma(java.lang.String str)

findLemma

public Lemma findLemma(Word word)

obtainLemmaForRoot

public Lemma obtainLemmaForRoot(Word root)

obtainWord

public Word obtainWord(java.lang.String word)

addFix

public void addFix(java.lang.String value,
                   boolean pre,
                   WordType type)

countWordList

public long countWordList()

iterateWordList

public java.util.Iterator iterateWordList(int start,
                                          int size)

getPrefixes

public java.util.Map<java.lang.String,Fix> getPrefixes()

getSuffixes

public java.util.Map<java.lang.String,Fix> getSuffixes()

removeFix

public Word removeFix(Word word,
                      Fix fix)

determineWordFixes

public java.util.Collection<Fix> determineWordFixes(Word word)

setupWord

public void setupWord(Word word)

addType

public void addType(Word word,
                    WordType type)

obtainLemma

public Lemma obtainLemma(java.lang.String str)

iterateLemmaList

public java.util.Iterator<Lemma> iterateLemmaList()

addWordType

public void addWordType(java.lang.String str)

getWordType

public WordType getWordType(java.lang.String code)

addType

public void addType(java.lang.String word,
                    WordType wordType)

registerGutenbergCount

public void registerGutenbergCount(java.lang.String word,
                                   int count)

registerWikiCount

public void registerWikiCount(java.lang.String word,
                              int count)

hasWordType

public boolean hasWordType(Word usedWord,
                           Lemma lemma,
                           WordType wordType)

The Encog Project