| Modifier and Type | Field and Description |
|---|---|
protected Locale |
conversionLocale |
protected WordTagger |
wordTagger |
| Constructor and Description |
|---|
BaseTagger(String filename) |
BaseTagger(String filename,
Locale conversionLocale) |
BaseTagger(String filename,
Locale locale,
boolean tagLowercaseWithUppercase) |
| Modifier and Type | Method and Description |
|---|---|
protected List<AnalyzedToken> |
additionalTags(String word,
WordTagger wordTagger)
Allows additional tagging in some language-dependent circumstances
|
protected AnalyzedToken |
asAnalyzedToken(String word,
morfologik.stemming.WordData wd) |
protected List<AnalyzedToken> |
asAnalyzedTokenList(String word,
List<morfologik.stemming.WordData> wdList) |
protected List<AnalyzedToken> |
asAnalyzedTokenListForTaggedWords(String word,
List<TaggedWord> taggedWords) |
AnalyzedTokenReadings |
createNullToken(String token,
int startPos)
Create the AnalyzedToken used for whitespace and other non-words.
|
AnalyzedToken |
createToken(String token,
String posTag)
Create a token specific to the language of the implementing class.
|
protected List<AnalyzedToken> |
getAnalyzedTokens(String word) |
protected morfologik.stemming.Dictionary |
getDictionary() |
String |
getDictionaryPath() |
abstract String |
getManualAdditionsFileName()
Get the filename for manual additions, e.g.,
/en/added.txt, or null. |
protected WordTagger |
getWordTagger() |
boolean |
overwriteWithManualTagger()
If true, tags from the binary dictionary (*.dict) will be overwritten by manual tags
from the plain text dictionary.
|
List<AnalyzedTokenReadings> |
tag(List<String> sentenceTokens)
Returns a list of
AnalyzedTokens that assigns each term in the
sentence some kind of part-of-speech information (not necessarily just one tag). |
protected List<AnalyzedTokenReadings> |
tag(String token) |
protected final WordTagger wordTagger
protected final Locale conversionLocale
public BaseTagger(String filename)
@Nullable public abstract String getManualAdditionsFileName()
/en/added.txt, or null.public String getDictionaryPath()
public boolean overwriteWithManualTagger()
protected WordTagger getWordTagger()
protected morfologik.stemming.Dictionary getDictionary()
public List<AnalyzedTokenReadings> tag(List<String> sentenceTokens) throws IOException
TaggerAnalyzedTokens that assigns each term in the
sentence some kind of part-of-speech information (not necessarily just one tag).
Note that this method takes exactly one sentence. Its implementation may implement special cases for the first word of a sentence, which is usually written with an uppercase letter.
tag in interface TaggersentenceTokens - the text as returned by a WordTokenizerIOExceptionprotected List<AnalyzedTokenReadings> tag(String token) throws IOException
IOExceptionprotected List<AnalyzedToken> getAnalyzedTokens(String word)
protected List<AnalyzedToken> asAnalyzedTokenList(String word, List<morfologik.stemming.WordData> wdList)
protected List<AnalyzedToken> asAnalyzedTokenListForTaggedWords(String word, List<TaggedWord> taggedWords)
protected AnalyzedToken asAnalyzedToken(String word, morfologik.stemming.WordData wd)
public final AnalyzedTokenReadings createNullToken(String token, int startPos)
Taggernull
as the POS tag for this token.createNullToken in interface Taggerpublic AnalyzedToken createToken(String token, String posTag)
TaggercreateToken in interface Tagger@Nullable protected List<AnalyzedToken> additionalTags(String word, WordTagger wordTagger)
word - The word to tagnull