Class ArabicTagger

java.lang.Object
org.languagetool.tagging.BaseTagger
org.languagetool.tagging.ar.ArabicTagger
All Implemented Interfaces:
Tagger

public class ArabicTagger extends BaseTagger
Since:
4.9
  • Field Details

    • tagmanager

      private final ArabicTagManager tagmanager
    • newStylePronounTag

      private boolean newStylePronounTag
  • Constructor Details

    • ArabicTagger

      public ArabicTagger()
  • Method Details

    • tag

      public List<AnalyzedTokenReadings> tag(List<String> sentenceTokens)
      Description copied from interface: Tagger
      Returns a list of AnalyzedTokens that assigns each term in the sentence some kind of part-of-speech information (not necessarily just one tag).

      Note that this method takes exactly one sentence. Its implementation may implement special cases for the first word of a sentence, which is usually written with an uppercase letter.

      Specified by:
      tag in interface Tagger
      Overrides:
      tag in class BaseTagger
      Parameters:
      sentenceTokens - the text as returned by a WordTokenizer
    • additionalTags

      @Nullable protected List<AnalyzedToken> additionalTags(String word, morfologik.stemming.IStemmer stemmer)
    • addTokens

      private void addTokens(List<AnalyzedToken> taggedTokens, List<AnalyzedToken> l)
    • getSuffixIndexList

      private List<Integer> getSuffixIndexList(String possibleWord)
    • getPrefixIndexList

      private List<Integer> getPrefixIndexList(String possibleWord)
    • getTags

      private List<String> getTags(String word, int posStart, int posEnd)
    • isStopWord

      private boolean isStopWord(List<AnalyzedToken> taggerTokens)
      Returns:
      test if word has stopword tagging
    • getPrefix

      private String getPrefix(String word, int pos)
    • getSuffix

      private String getSuffix(String word, int pos)
    • getStem

      private List<String> getStem(String word, int posStart, int posEnd)
    • enableNewStylePronounTag

      public void enableNewStylePronounTag()
    • getProclitic

      public String getProclitic(AnalyzedToken token)
      Returns:
      if have a flag which is a noun/verb and has proclitics, return the first prefix named procletic letters for this case
    • getEnclitic

      public String getEnclitic(AnalyzedToken token)
      Returns:
      if have a flag which is a noun and has pronoun, return the suffix letters for this case
    • getJarProclitic

      public String getJarProclitic(AnalyzedToken token)
      Returns:
      if have a flag which is a noun and has proclitics, return the first prefix named procletic letters for this case
    • tag

      public AnalyzedTokenReadings tag(String word)
    • getLemmas

      public List<String> getLemmas(AnalyzedTokenReadings patternTokens, String type)