Class ArabicSynthesizer

java.lang.Object
org.languagetool.synthesis.BaseSynthesizer
org.languagetool.synthesis.ar.ArabicSynthesizer
All Implemented Interfaces:
Synthesizer

public class ArabicSynthesizer extends BaseSynthesizer
Arabic word form synthesizer. Based on part-of-speech lists in Public Domain. See readme.txt for details, the POS tagset is described in arabic_tags_description.txt.

There are two special additions:

  1. +GF - tag that adds feminine gender to word
  2. +GM - a tag that adds masculine gender to word
Since:
4.9
  • Field Details

  • Constructor Details

    • ArabicSynthesizer

      public ArabicSynthesizer(Language lang)
      Deprecated.
    • ArabicSynthesizer

      private ArabicSynthesizer()
  • Method Details

    • synthesize

      public String[] synthesize(AnalyzedToken token, String posTag)
      Get a form of a given AnalyzedToken, where the form is defined by a part-of-speech tag.
      Specified by:
      synthesize in interface Synthesizer
      Overrides:
      synthesize in class BaseSynthesizer
      Parameters:
      token - AnalyzedToken to be inflected.
      posTag - A desired part-of-speech tag.
      Returns:
      String value - inflected word.
    • synthesize

      public String[] synthesize(AnalyzedToken token, String posTag, boolean posTagRegExp) throws IOException
      Description copied from interface: Synthesizer
      Generates a form of the word with a given POS tag for a given lemma. POS tag can be specified using regular expressions.
      Specified by:
      synthesize in interface Synthesizer
      Overrides:
      synthesize in class BaseSynthesizer
      Parameters:
      token - the token to be used for synthesis
      posTag - POS tag of the form to be generated
      posTagRegExp - Specifies whether the posTag string is a regular expression.
      Throws:
      IOException
    • correctTag

      public String correctTag(String postag)
    • getPosTagCorrection

      public String getPosTagCorrection(String posTag)
      Description copied from interface: Synthesizer
      Gets 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:
      getPosTagCorrection in interface Synthesizer
      Overrides:
      getPosTagCorrection in class BaseSynthesizer
      Parameters:
      posTag - original POS tag to correct
      Returns:
      converted POS tag
    • correctStem

      public String correctStem(String stem, String postag)
    • setEnclitic

      public String setEnclitic(AnalyzedToken token, String suffix)
      Returns:
      set a new enclitic for the given word,
    • setEncliticMultiple

      public List<String> setEncliticMultiple(AnalyzedToken token, String suffix)
    • setJarProcletic

      public String setJarProcletic(AnalyzedToken token, String prefix)
      Returns:
      set a new procletic for the given word,
    • setProcletic

      public String setProcletic(AnalyzedToken token, String prefix)
      Returns:
      set a new procletic for the given word,
    • inflectLemmaLike

      public List<String> inflectLemmaLike(String targetLemma, AnalyzedToken sourcetoken)
    • inflectMafoulMutlq

      public static String inflectMafoulMutlq(String word)
    • inflectAdjectiveTanwinNasb

      public static String inflectAdjectiveTanwinNasb(String word, boolean feminin)