Package org.languagetool.tagging.xx
Class DemoTagger
- java.lang.Object
-
- org.languagetool.tagging.xx.DemoTagger
-
-
Constructor Summary
Constructors Constructor Description DemoTagger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.List<AnalyzedTokenReadings>
tag(List<String> sentenceTokens)
Returns a list ofAnalyzedToken
s that assigns each term in the sentence some kind of part-of-speech information (not necessarily just one tag).
-
-
-
Method Detail
-
tag
public List<AnalyzedTokenReadings> tag(List<String> sentenceTokens)
Description copied from interface:Tagger
Returns a list ofAnalyzedToken
s 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.
-
createNullToken
public AnalyzedTokenReadings createNullToken(String token, int startPos)
Description copied from interface:Tagger
Create the AnalyzedToken used for whitespace and other non-words. Usenull
as the POS tag for this token.- Specified by:
createNullToken
in interfaceTagger
-
createToken
public AnalyzedToken createToken(String token, String posTag)
Description copied from interface:Tagger
Create a token specific to the language of the implementing class.- Specified by:
createToken
in interfaceTagger
-
-