Package org.languagetool.synthesis.es
Class SpanishSynthesizer
java.lang.Object
org.languagetool.synthesis.BaseSynthesizer
org.languagetool.synthesis.es.SpanishSynthesizer
- All Implemented Interfaces:
Synthesizer
Spanish word form synthesizer.
Based on Dutch word from synthesizer
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SpanishSynthesizerprivate static final Patternprivate static final Stringprivate static final StringFields inherited from class org.languagetool.synthesis.BaseSynthesizer
language, possibleTags, SPELLNUMBER_FEMININE_TAG, SPELLNUMBER_ROMAN_TAG, SPELLNUMBER_TAG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddWordsAfter(List<String> results, String toAddAfter) getTargetPosTag(List<String> posTags, String targetPosTag) Select the desired POS tag to synthesizeString[]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, initPossibleTags, isException, lookup, removeExceptions, synthesizeForPosTags
-
Field Details
-
RESOURCE_FILENAME
- See Also:
-
TAGS_FILE_NAME
- See Also:
-
pLemmaSpace
-
INSTANCE
-
-
Constructor Details
-
SpanishSynthesizer
Deprecated.useINSTANCE -
SpanishSynthesizer
private SpanishSynthesizer()
-
-
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 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
-
addWordsAfter
-
getTargetPosTag
Description copied from interface:SynthesizerSelect the desired POS tag to synthesize- Specified by:
getTargetPosTagin interfaceSynthesizer- Overrides:
getTargetPosTagin classBaseSynthesizer
-
INSTANCE