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

    Fields
    Modifier and Type
    Field
    Description
    private static final Pattern
     
    private static final Pattern
     
    private static final Pattern
     
    private static final Pattern
     
    private static final Pattern
     
    private static final Pattern
    Patterns for apostrophation
    private static final Pattern
     
    private static final Pattern
    Patterns for number and gender
    private static final Pattern
    Pattern for previous preposition passed in the postag
    private static final Pattern
    Patterns verb

    Fields inherited from class org.languagetool.synthesis.BaseSynthesizer

    possibleTags, SPELLNUMBER_TAG
  • Constructor Summary

    Constructors
    Constructor
    Description
    CatalanSynthesizer(org.languagetool.Language lang)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    synthesize(org.languagetool.AnalyzedToken token, String posTag)
     
    synthesize(org.languagetool.AnalyzedToken token, String posTag, boolean posTagRegExp)
     

    Methods inherited from class org.languagetool.synthesis.BaseSynthesizer

    createStemmer, getDictionary, getPosTagCorrection, getSpelledNumber, getStemmer, initPossibleTags, lookup

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • pMS

      private static final Pattern pMS
      Patterns for number and gender
    • pFS

      private static final Pattern pFS
    • pMP

      private static final Pattern pMP
    • pFP

      private static final Pattern pFP
    • pPrep

      private static final Pattern pPrep
      Pattern for previous preposition passed in the postag
    • pMascYes

      private static final Pattern pMascYes
      Patterns for apostrophation
    • pMascNo

      private static final Pattern pMascNo
    • pFemYes

      private static final Pattern pFemYes
    • pFemNo

      private static final Pattern pFemNo
    • pVerb

      private static final Pattern pVerb
      Patterns verb
  • Constructor Details

    • CatalanSynthesizer

      public CatalanSynthesizer(org.languagetool.Language lang)
  • Method Details

    • synthesize

      public String[] synthesize(org.languagetool.AnalyzedToken token, String posTag) throws IOException
      Specified by:
      synthesize in interface org.languagetool.synthesis.Synthesizer
      Overrides:
      synthesize in class org.languagetool.synthesis.BaseSynthesizer
      Throws:
      IOException
    • synthesize

      public String[] synthesize(org.languagetool.AnalyzedToken token, String posTag, boolean posTagRegExp) throws IOException
      Specified by:
      synthesize in interface org.languagetool.synthesis.Synthesizer
      Overrides:
      synthesize in class org.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.