Class PortugueseWordRepeatRule

java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.WordRepeatRule
org.languagetool.rules.pt.PortugueseWordRepeatRule

public class PortugueseWordRepeatRule extends WordRepeatRule
Palavras que se repetem no Poruguês.
Since:
3.6
  • Field Details

    • TAUTONYMS_GENUS

      private static final Pattern TAUTONYMS_GENUS
    • TAUTONYMS_SPECIES

      private static final Pattern TAUTONYMS_SPECIES
    • PRONOUNS

      private static final Pattern PRONOUNS
    • REDUPLICATED_ADVERBS

      private static final Pattern REDUPLICATED_ADVERBS
  • Constructor Details

  • Method Details

    • getId

      public String getId()
      Description copied from class: Rule
      A string used to identify the rule in e.g. configuration files. This string is supposed to be unique and to stay the same in all upcoming versions of LanguageTool. It's supposed to contain only the characters A-Z and the underscore.
      Overrides:
      getId in class WordRepeatRule
    • ignore

      public boolean ignore(AnalyzedTokenReadings[] tokens, int position)
      Description copied from class: WordRepeatRule
      Implement this method to return true if there's a potential word repetition at the current position that should be ignored, i.e. if no error should be created.
      Overrides:
      ignore in class WordRepeatRule
      Parameters:
      tokens - the tokens of the sentence currently being checked
      position - the current position in the tokens
      Returns:
      this implementation always returns false
    • isHyphenated

      private boolean isHyphenated(AnalyzedTokenReadings[] tokens, int position)
    • isPronoun

      private boolean isPronoun(AnalyzedTokenReadings token)
    • isGenus

      private boolean isGenus(AnalyzedTokenReadings token)
    • isSpecies

      private boolean isSpecies(AnalyzedTokenReadings token)
    • isReduplicatedAdverb

      private boolean isReduplicatedAdverb(AnalyzedTokenReadings token)