Interface Synthesizer

  • All Known Implementing Classes:
    BaseSynthesizer

    public interface Synthesizer
    Part-of-speech synthesizer interface. Implementations are heavily language-dependent.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getPosTagCorrection​(java.lang.String posTag)
      Gets a corrected version of the POS tag used for synthesis.
      java.lang.String getSpelledNumber​(java.lang.String arabicNumeral)
      Spells out a number
      java.lang.String[] synthesize​(AnalyzedToken token, java.lang.String posTag)
      Generates a form of the word with a given POS tag for a given lemma.
      java.lang.String[] synthesize​(AnalyzedToken token, java.lang.String posTag, boolean posTagRegExp)
      Generates a form of the word with a given POS tag for a given lemma.
    • Method Detail

      • synthesize

        java.lang.String[] synthesize​(AnalyzedToken token,
                                      java.lang.String posTag)
                               throws java.io.IOException
        Generates a form of the word with a given POS tag for a given lemma.
        Parameters:
        token - the token to be used for synthesis
        posTag - POS tag of the form to be generated
        Throws:
        java.io.IOException
      • synthesize

        java.lang.String[] synthesize​(AnalyzedToken token,
                                      java.lang.String posTag,
                                      boolean posTagRegExp)
                               throws java.io.IOException
        Generates a form of the word with a given POS tag for a given lemma. POS tag can be specified using regular expressions.
        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:
        java.io.IOException
      • getPosTagCorrection

        java.lang.String getPosTagCorrection​(java.lang.String posTag)
        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.
        Parameters:
        posTag - original POS tag to correct
        Returns:
        converted POS tag
      • getSpelledNumber

        java.lang.String getSpelledNumber​(java.lang.String arabicNumeral)
        Spells out a number
        Parameters:
        arabicNumeral - in arabic numerals
        Returns:
        String of the spelled out number