Package org.languagetool.synthesis
Class GermanSynthesizer
java.lang.Object
org.languagetool.synthesis.BaseSynthesizer
org.languagetool.synthesis.GermanSynthesizer
- All Implemented Interfaces:
Synthesizer
German word form synthesizer. Also supports compounds.
- Since:
- 2.4
-
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 TypeMethodDescriptionprivate String[]getCompoundForms(AnalyzedToken token, String posTag, boolean posTagRegExp) Lookup the inflected forms of a lemma defined by a part-of-speech tag.String[]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) Generates a form of the word with a given POS tag for a given lemma.Methods inherited from class org.languagetool.synthesis.BaseSynthesizer
createStemmer, getDictionary, getPosTagCorrection, getRomanNumber, getSpelledNumber, getStemmer, getTargetPosTag, initPossibleTags, isException, removeExceptions, synthesizeForPosTags
-
Field Details
-
INSTANCE
-
REMOVE
-
-
Constructor Details
-
GermanSynthesizer
Deprecated.useINSTANCE -
GermanSynthesizer
private GermanSynthesizer()
-
-
Method Details
-
lookup
Description copied from class:BaseSynthesizerLookup the inflected forms of a lemma defined by a part-of-speech tag.- Overrides:
lookupin classBaseSynthesizer- Parameters:
lemma- the lemma to be inflected.posTag- the desired part-of-speech tag.
-
synthesize
Description copied from class:BaseSynthesizerGet 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- The desired part-of-speech tag.- Returns:
- inflected words, or an empty array if no forms were found
- Throws:
IOException
-
synthesize
public String[] synthesize(AnalyzedToken token, String posTag, boolean posTagRegExp) throws IOException Description copied from interface:SynthesizerGenerates a form of the word with a given POS tag for a given lemma. POS tag can be specified using regular expressions.- Specified by:
synthesizein interfaceSynthesizer- Overrides:
synthesizein classBaseSynthesizer- Parameters:
token- the token to be used for synthesisposTag- POS tag of the form to be generatedposTagRegExp- Specifies whether the posTag string is a regular expression.- Throws:
IOException
-
getCompoundForms
@NotNull private String[] getCompoundForms(AnalyzedToken token, String posTag, boolean posTagRegExp) throws IOException - Throws:
IOException
-
INSTANCE