Class UkrainianWordRepeatRule


public class UkrainianWordRepeatRule extends WordRepeatRule
Since:
2.9
  • Field Details

    • DATE_TIME_NUM_PATTERN

      private static final Pattern DATE_TIME_NUM_PATTERN
    • REPEAT_ALLOWED_SET

      private static final HashSet<String> REPEAT_ALLOWED_SET
    • REPEAT_ALLOWED_CAPS_SET

      private static final HashSet<String> REPEAT_ALLOWED_CAPS_SET
  • 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
    • isInitial

      private boolean isInitial(AnalyzedToken analyzedToken, AnalyzedTokenReadings[] tokens, int position)
    • createRuleMatch

      protected RuleMatch createRuleMatch(String prevToken, String token, int prevPos, int pos, String msg, AnalyzedSentence sentence)
      Overrides:
      createRuleMatch in class WordRepeatRule