Package org.languagetool.synthesis.ar
Class ArabicSynthesizer
java.lang.Object
org.languagetool.synthesis.BaseSynthesizer
org.languagetool.synthesis.ar.ArabicSynthesizer
- All Implemented Interfaces:
Synthesizer
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:
- +GF - tag that adds feminine gender to word
- +GM - a tag that adds masculine gender to word
- Since:
- 4.9
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ArabicSynthesizerprivate static final Stringprivate final ArabicTaggerprivate final ArabicTagManagerprivate static final StringFields inherited from class org.languagetool.synthesis.BaseSynthesizer
language, possibleTags, SPELLNUMBER_FEMININE_TAG, SPELLNUMBER_ROMAN_TAG, SPELLNUMBER_TAG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncorrectStem(String stem, String postag) correctTag(String postag) getPosTagCorrection(String posTag) Gets a corrected version of the POS tag used for synthesis.static StringinflectAdjectiveTanwinNasb(String word, boolean feminin) inflectLemmaLike(String targetLemma, AnalyzedToken sourcetoken) static StringinflectMafoulMutlq(String word) setEnclitic(AnalyzedToken token, String suffix) setEncliticMultiple(AnalyzedToken token, String suffix) setJarProcletic(AnalyzedToken token, String prefix) setProcletic(AnalyzedToken token, String prefix) String[]synthesize(AnalyzedToken token, String posTag) Get a form of a given AnalyzedToken, where the form is defined by a part-of-speech tag.String[]synthesize(AnalyzedToken token, String posTag, boolean posTagRegExp) Generates a form of the word with a given POS tag for a given lemma.Methods inherited from class org.languagetool.synthesis.BaseSynthesizer
createStemmer, getDictionary, getRomanNumber, getSpelledNumber, getStemmer, getTargetPosTag, initPossibleTags, isException, lookup, removeExceptions, synthesizeForPosTags
-
Field Details
-
RESOURCE_FILENAME
- See Also:
-
TAGS_FILE_NAME
- See Also:
-
tagmanager
-
tagger
-
INSTANCE
-
-
Constructor Details
-
ArabicSynthesizer
Deprecated.useINSTANCE -
ArabicSynthesizer
private ArabicSynthesizer()
-
-
Method Details
-
synthesize
Get a form of a given AnalyzedToken, where the form is defined by a part-of-speech tag.- Specified by:
synthesizein interfaceSynthesizer- Overrides:
synthesizein classBaseSynthesizer- 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:SynthesizerGenerates a form of the word with a given POS tag for a given lemma. POS tag can be specified using regular expressions.- Specified by:
synthesizein interfaceSynthesizer- Overrides:
synthesizein classBaseSynthesizer- Parameters:
token- the token to be used for synthesisposTag- POS tag of the form to be generatedposTagRegExp- Specifies whether the posTag string is a regular expression.- Throws:
IOException
-
correctTag
-
getPosTagCorrection
Description copied from interface:SynthesizerGets 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:
getPosTagCorrectionin interfaceSynthesizer- Overrides:
getPosTagCorrectionin classBaseSynthesizer- Parameters:
posTag- original POS tag to correct- Returns:
- converted POS tag
-
correctStem
-
setEnclitic
- Returns:
- set a new enclitic for the given word,
-
setEncliticMultiple
-
setJarProcletic
- Returns:
- set a new procletic for the given word,
-
setProcletic
- Returns:
- set a new procletic for the given word,
-
inflectLemmaLike
-
inflectMafoulMutlq
-
inflectAdjectiveTanwinNasb
-
INSTANCE