Class CatalanSynthesizer
java.lang.Object
org.languagetool.synthesis.BaseSynthesizer
org.languagetool.synthesis.ca.CatalanSynthesizer
- All Implemented Interfaces:
org.languagetool.synthesis.Synthesizer
public class CatalanSynthesizer
extends org.languagetool.synthesis.BaseSynthesizer
Catalan word form synthesizer.
There are special additions:
"DT" tag adds "el, la, l', els, les" according to the gender
and the number of the word and the Catalan rules for apostrophation (l').
"DTa" adds "al, a la, a l', als, a les"
"DTde" adds "del, de la, de l', dels, de les"
"DTper" adds "pel, per la, per l', pels, per les"
"DTca" adds "cal, ca la, ca l', cals, ca les"
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final PatternPatterns for apostrophationprivate static final Patternprivate static final PatternPatterns for number and genderprivate static final PatternPattern for previous preposition passed in the postagprivate static final PatternPatterns verbFields inherited from class org.languagetool.synthesis.BaseSynthesizer
possibleTags, SPELLNUMBER_TAG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidlookupWithEl(String lemma, String posTag, String prep, List<String> results, morfologik.stemming.IStemmer synthesizer) Lookup the inflected forms of a lemma defined by a part-of-speech tag.String[]synthesize(org.languagetool.AnalyzedToken token, String posTag) String[]synthesize(org.languagetool.AnalyzedToken token, String posTag, boolean posTagRegExp) Methods inherited from class org.languagetool.synthesis.BaseSynthesizer
createStemmer, getDictionary, getPosTagCorrection, getSpelledNumber, getStemmer, initPossibleTags, lookup
-
Field Details
-
pMS
Patterns for number and gender -
pFS
-
pMP
-
pFP
-
pPrep
Pattern for previous preposition passed in the postag -
pMascYes
Patterns for apostrophation -
pMascNo
-
pFemYes
-
pFemNo
-
pVerb
Patterns verb
-
-
Constructor Details
-
CatalanSynthesizer
public CatalanSynthesizer(org.languagetool.Language lang)
-
-
Method Details
-
synthesize
- Specified by:
synthesizein interfaceorg.languagetool.synthesis.Synthesizer- Overrides:
synthesizein classorg.languagetool.synthesis.BaseSynthesizer- Throws:
IOException
-
synthesize
public String[] synthesize(org.languagetool.AnalyzedToken token, String posTag, boolean posTagRegExp) throws IOException - Specified by:
synthesizein interfaceorg.languagetool.synthesis.Synthesizer- Overrides:
synthesizein classorg.languagetool.synthesis.BaseSynthesizer- Throws:
IOException
-
lookupWithEl
private void lookupWithEl(String lemma, String posTag, String prep, List<String> results, morfologik.stemming.IStemmer synthesizer) Lookup the inflected forms of a lemma defined by a part-of-speech tag. Adds determiner "el" properly inflected and preposition (prep. +) det. + noun. / adj.- Parameters:
lemma- the lemma to be inflected.posTag- the desired part-of-speech tag.results- the list to collect the inflected forms.synthesizer- the stemmer to use.
-