Package org.languagetool.tagging.xx
Class DemoTagger
java.lang.Object
org.languagetool.tagging.xx.DemoTagger
- All Implemented Interfaces:
Tagger
A trivial tagger that does nothing than assign null
tags to words.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateNullToken
(String token, int startPos) Create the AnalyzedToken used for whitespace and other non-words.createToken
(String token, String posTag) Create a token specific to the language of the implementing class.Returns a list ofAnalyzedToken
s that assigns each term in the sentence some kind of part-of-speech information (not necessarily just one tag).
-
Constructor Details
-
DemoTagger
public DemoTagger()
-
-
Method Details
-
tag
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
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
Description copied from interface:Tagger
Create a token specific to the language of the implementing class.- Specified by:
createToken
in interfaceTagger
-