public interface PartOfSpeechGuesser
A part of speech guesser "guesses" the probable part(s) of speech for a word which does not appear in the main lexicon. Alternate spellings, lexical rules based upon word prefixes or suffixes, and many other approaches may be used to find potential part of speech.
Modifier and Type | Method and Description |
---|---|
void |
addAuxiliaryWordList(TaggedStrings wordList)
Add an auxiliary word list.
|
java.util.List |
getAuxiliaryWordLists()
Get auxiliary word lists.
|
Lexicon |
getCachedLexiconForWord(java.lang.String word)
Get cached lexicon for a word.
|
SpellingStandardizer |
getSpellingStandardizer()
Get spelling standardizer.
|
Lexicon |
getSuffixLexicon()
Get the suffix lexicon.
|
Lexicon |
getWordLexicon()
Get the word lexicon.
|
java.util.Map<java.lang.String,MutableInteger> |
guessPartsOfSpeech(java.util.List<java.lang.String> sentence,
int wordIndex)
Guesses part of speech for a word in a sentence.
|
java.util.Map<java.lang.String,MutableInteger> |
guessPartsOfSpeech(java.lang.String word)
Guesses part of speech for a word.
|
java.util.Map<java.lang.String,MutableInteger> |
guessPartsOfSpeech(java.lang.String word,
boolean isFirstWord)
Guesses part of speech for a word.
|
void |
setAbbreviations(Abbreviations abbreviations)
Set abbreviations.
|
void |
setCheckPossessives(boolean checkPossessives)
Check for possessives of known nouns when guessing parts of speech.
|
void |
setSpellingStandardizer(SpellingStandardizer spellingStandardizer)
Set spelling standardizer.
|
void |
setSuffixLexicon(Lexicon suffixLexicon)
Set the suffix lexicon.
|
void |
setTryStandardSpellings(boolean tryStandardSpellings)
Try using standardized spellings when guessing parts of speech.
|
void |
setWordLexicon(Lexicon wordLexicon)
Set the word lexicon.
|
java.util.Map<java.lang.String,MutableInteger> guessPartsOfSpeech(java.lang.String word)
word
- The word.java.util.Map<java.lang.String,MutableInteger> guessPartsOfSpeech(java.lang.String word, boolean isFirstWord)
word
- The word.isFirstWord
- If word is first word in a sentence.java.util.Map<java.lang.String,MutableInteger> guessPartsOfSpeech(java.util.List<java.lang.String> sentence, int wordIndex)
sentence
- Sentence as a list of words.wordIndex
- The word index in the sentence.SpellingStandardizer getSpellingStandardizer()
void setSpellingStandardizer(SpellingStandardizer spellingStandardizer)
spellingStandardizer
- The spelling standardizer.Lexicon getWordLexicon()
void setWordLexicon(Lexicon wordLexicon)
wordLexicon
- The word lexicon.Lexicon getSuffixLexicon()
Lexicon getCachedLexiconForWord(java.lang.String word)
word
- The word whose source lexicon we want.void setSuffixLexicon(Lexicon suffixLexicon)
suffixLexicon
- The suffix lexicon.void addAuxiliaryWordList(TaggedStrings wordList)
java.util.List getAuxiliaryWordLists()
void setTryStandardSpellings(boolean tryStandardSpellings)
void setCheckPossessives(boolean checkPossessives)
void setAbbreviations(Abbreviations abbreviations)
abbreviations
- Abbreviations.