Package org.languagetool.synthesis.pl
Class PolishSynthesizer
java.lang.Object
org.languagetool.synthesis.BaseSynthesizer
org.languagetool.synthesis.pl.PolishSynthesizer
- All Implemented Interfaces:
Synthesizer
Polish word form synthesizer. Based on project Morfologik.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Patternstatic final PolishSynthesizerprivate static final Stringprivate static final Patternprivate static final Patternprivate static final Stringprivate static final Stringprivate static final Stringprivate static final StringFields inherited from class org.languagetool.synthesis.BaseSynthesizer
language, SPELLNUMBER_FEMININE_TAG, SPELLNUMBER_ROMAN_TAG, SPELLNUMBER_TAG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringgetPosTagCorrection(String posTag) Gets a corrected version of the POS tag used for synthesis.getWordForms(AnalyzedToken token, String posTag, boolean isNegated, morfologik.stemming.IStemmer synthesizer) final String[]synthesize(AnalyzedToken token, String posTag) Get a form of a given AnalyzedToken, where the form is defined by a part-of-speech tag.final String[]synthesize(AnalyzedToken token, String pos, 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, getRomanNumber, getSpelledNumber, getStemmer, getTargetPosTag, initPossibleTags, isException, lookup, removeExceptions, synthesizeForPosTagsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.languagetool.synthesis.Synthesizer
getSpelledNumber, getTargetPosTag
-
Field Details
-
RESOURCE_FILENAME
- See Also:
-
TAGS_FILE_NAME
- See Also:
-
POTENTIAL_NEGATION_TAG
- See Also:
-
NEGATION_TAG
- See Also:
-
NEGATION_TAG_PATTERN
-
COMP_TAG
- See Also:
-
SUP_TAG
- See Also:
-
PATTERN
-
DOT
-
possibleTags
-
INSTANCE
-
-
Constructor Details
-
PolishSynthesizer
Deprecated.useINSTANCE -
PolishSynthesizer
private PolishSynthesizer()
-
-
Method Details
-
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 final String[] synthesize(AnalyzedToken token, String pos, 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 synthesispos- POS tag of the form to be generatedposTagRegExp- Specifies whether the posTag string is a regular expression.- Throws:
IOException
-
getPosTagCorrection
Description copied from interface:SynthesizerGets a corrected version of the POS tag used for synthesis. Useful when the tagset defines special disjunction that need to be converted into regexp disjunctions.- Specified by:
getPosTagCorrectionin interfaceSynthesizer- Overrides:
getPosTagCorrectionin classBaseSynthesizer- Parameters:
posTag- original POS tag to correct- Returns:
- converted POS tag
-
getWordForms
private List<String> getWordForms(AnalyzedToken token, String posTag, boolean isNegated, morfologik.stemming.IStemmer synthesizer)
-
INSTANCE