Class CatalanWordRepeatBeginningRule


public class CatalanWordRepeatBeginningRule extends WordRepeatBeginningRule
Adds Catalan suggestions to WordRepeatBeginningRule.
  • Field Details

    • ADD_ADVERBS

      private static final Set<String> ADD_ADVERBS
    • CONTRAST_CONJ

      private static final Set<String> CONTRAST_CONJ
    • CAUSE_CONJ

      private static final Set<String> CAUSE_CONJ
    • EMPHASIS_ADVERBS

      private static final Set<String> EMPHASIS_ADVERBS
    • EXPLAIN_ADVERBS

      private static final Set<String> EXPLAIN_ADVERBS
    • PERSONAL_PRONOUNS

      private static final Set<String> PERSONAL_PRONOUNS
    • ADD_EXPRESSIONS

      private static final List<String> ADD_EXPRESSIONS
    • CONTRAST_EXPRESSIONS

      private static final List<String> CONTRAST_EXPRESSIONS
    • CAUSE_EXPRESSIONS

      private static final List<String> CAUSE_EXPRESSIONS
    • EXCEPCIONS_START

      private static final List<String> EXCEPCIONS_START
  • Constructor Details

    • CatalanWordRepeatBeginningRule

      public CatalanWordRepeatBeginningRule(ResourceBundle messages, Language language)
  • 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 WordRepeatBeginningRule
    • isException

      public boolean isException(String token)
      Overrides:
      isException in class WordRepeatBeginningRule
    • isAdverb

      protected boolean isAdverb(AnalyzedTokenReadings token)
      Overrides:
      isAdverb in class WordRepeatBeginningRule
    • getSuggestions

      protected List<String> getSuggestions(AnalyzedTokenReadings token)
      Overrides:
      getSuggestions in class WordRepeatBeginningRule
    • getDifferentAdverbsOfSameCategory

      private List<String> getDifferentAdverbsOfSameCategory(String adverb, Set<String> adverbsOfCategory)
      Gives suggestions to replace the given adverb.
      Parameters:
      adverb - to get suggestions for
      adverbsOfCategory - the adverbs of the same category as adverb (adverb is required to be contained in the Set)
      Returns:
      a List of suggested adverbs to replace the given adverb