Class EnglishSynthesizer

java.lang.Object
org.languagetool.synthesis.BaseSynthesizer
org.languagetool.synthesis.en.EnglishSynthesizer
All Implemented Interfaces:
org.languagetool.synthesis.Synthesizer

public class EnglishSynthesizer extends org.languagetool.synthesis.BaseSynthesizer
English word form synthesizer. Based on part-of-speech lists in Public Domain. See readme.txt for details, the POS tagset is described in tagset.txt. There are to special additions:
  1. +DT - tag that adds "a" or "an" (according to the way the word is pronounced) and "the"
  2. +INDT - a tag that adds only "a" or "an"
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final String
     
    private static final String
     
    private final AvsAnRule
     
    private static final String
     
    private static final String
     

    Fields inherited from class org.languagetool.synthesis.BaseSynthesizer

    possibleTags, SPELLNUMBER_TAG
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    private void
    lookup(String lemma, String posTag, List<String> results, String determiner)
     
    synthesize(org.languagetool.AnalyzedToken token, String posTag)
    Get a form of a given AnalyzedToken, where the form is defined by a part-of-speech tag.
    synthesize(org.languagetool.AnalyzedToken token, String posTag, boolean posTagRegExp)
    Special English regexp based synthesizer that allows adding articles when the regexp-based tag ends with a special signature \\+INDT or \\+DT.

    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

  • Constructor Details

    • EnglishSynthesizer

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

    • synthesize

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

      public String[] synthesize(org.languagetool.AnalyzedToken token, String posTag, boolean posTagRegExp) throws IOException
      Special English regexp based synthesizer that allows adding articles when the regexp-based tag ends with a special signature \\+INDT or \\+DT.
      Specified by:
      synthesize in interface org.languagetool.synthesis.Synthesizer
      Overrides:
      synthesize in class org.languagetool.synthesis.BaseSynthesizer
      Throws:
      IOException
      Since:
      2.5
    • lookup

      private void lookup(String lemma, String posTag, List<String> results, String determiner)