Package org.languagetool.synthesis.en
Class EnglishSynthesizer
java.lang.Object
org.languagetool.synthesis.BaseSynthesizer
org.languagetool.synthesis.en.EnglishSynthesizer
- All Implemented Interfaces:
Synthesizer
English word form synthesizer.
Based on part-of-speech lists in Public Domain. See readme.txt for details,
the POS tagset is described in tagset.txt.
There are to special additions:
- +DT - tag that adds "a" or "an" (according to the way the word is pronounced) and "the"
- +INDT - a tag that adds only "a" or "an"
- Author:
- Marcin MiĆkowski
-
Field Summary
FieldsFields inherited from class org.languagetool.synthesis.BaseSynthesizer
language, possibleTags, SPELLNUMBER_FEMININE_TAG, SPELLNUMBER_ROMAN_TAG, SPELLNUMBER_TAG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanString[]synthesize(AnalyzedToken token, String posTag) Get a form of a given AnalyzedToken, where the form is defined by a part-of-speech tag.String[]synthesize(AnalyzedToken token, String posTag, boolean posTagRegExp) Special English regexp based synthesizer that allows adding articles when the regexp-based tag ends with a special signature\\+INDTor\\+DT.Methods inherited from class org.languagetool.synthesis.BaseSynthesizer
createStemmer, getDictionary, getPosTagCorrection, getRomanNumber, getSpelledNumber, getStemmer, getTargetPosTag, initPossibleTags, lookup, removeExceptions, synthesizeForPosTags
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
EnglishSynthesizer
Deprecated.useINSTANCE
-
-
Method Details
-
synthesize
Get a form of a given AnalyzedToken, where the form is defined by a part-of-speech tag.- Specified by:
synthesizein interfaceSynthesizer- Overrides:
synthesizein classBaseSynthesizer- Parameters:
token- AnalyzedToken to be inflected.posTag- A desired part-of-speech tag.- Returns:
- String value - inflected word.
- Throws:
IOException
-
synthesize
public String[] synthesize(AnalyzedToken token, String posTag, boolean posTagRegExp) throws IOException Special English regexp based synthesizer that allows adding articles when the regexp-based tag ends with a special signature\\+INDTor\\+DT.- Specified by:
synthesizein interfaceSynthesizer- Overrides:
synthesizein classBaseSynthesizer- Throws:
IOException- Since:
- 2.5
-
isException
- Overrides:
isExceptionin classBaseSynthesizer
-
INSTANCE