de.danielnaber.languagetool.synthesis
Interface Synthesizer

All Known Implementing Classes:
DutchSynthesizer, EnglishSynthesizer, PolishSynthesizer

public interface Synthesizer

Part-of-speech synthesiser interface. Implementations are heavily language-dependent.

Author:
Marcin MiƂkowski

Method Summary
 String getPosTagCorrection(String posTag)
          Gets a corrected version of the POS tag used for synthesis.
 String[] synthesize(AnalyzedToken token, String posTag)
          Generates a form of the word with a given POS tag for a given lemma.
 String[] synthesize(AnalyzedToken token, String posTag, boolean posTagRegExp)
          Generates a form of the word with a given POS tag for a given lemma.
 

Method Detail

synthesize

String[] synthesize(AnalyzedToken token,
                    String posTag)
                    throws 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:
IOException

synthesize

String[] synthesize(AnalyzedToken token,
                    String posTag,
                    boolean posTagRegExp)
                    throws 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:
IOException

getPosTagCorrection

String getPosTagCorrection(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:
@String Converted POS tag.


Copyright © 2005-2007 Daniel Naber