Class MorfologikCatalanSpellerRule

java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.spelling.SpellingCheckRule
org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule
org.languagetool.rules.ca.MorfologikCatalanSpellerRule

public final class MorfologikCatalanSpellerRule extends org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final Pattern
     
    private static final Pattern
     
    private static final Pattern
     
    private static final Pattern
     
    private String
     
    private static final Pattern
     
    private static final Pattern
     
    private static final Pattern
     
    private static final Pattern
     
    private static final Pattern
     
    private static final String
     
     
    private static final Pattern
     
    private static final Pattern
     

    Fields inherited from class org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule

    conversionLocale, speller1, speller2, speller3

    Fields inherited from class org.languagetool.rules.spelling.SpellingCheckRule

    ignoreWordsWithLength, language, languageModel, LANGUAGETOOL, LANGUAGETOOLER, wordListLoader

    Fields inherited from class org.languagetool.rules.Rule

    messages
  • Constructor Summary

    Constructors
    Constructor
    Description
    MorfologikCatalanSpellerRule(ResourceBundle messages, org.languagetool.Language language, org.languagetool.UserConfig userConfig, List<org.languagetool.Language> altLanguages)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private String
    findSuggestion(String suggestion, String word, Pattern wordPattern, Pattern postagPattern, int suggestionPosition, String separator)
     
    protected List<String>
     
     
     
     
    private boolean
    matchPostagRegexp(org.languagetool.AnalyzedTokenReadings aToken, Pattern pattern)
    Match POS tag with regular expression
    protected List<String>
    orderSuggestions(List<String> suggestions, String word)
     
    boolean
     

    Methods inherited from class org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule

    getDescription, getFrequency, getRuleMatches, ignoreWord, isMisspelled, isMisspelled, isSurrogatePairCombination, match, setCheckCompound, setCompoundRegex, setIgnoreTaggedWords, setLocale, tokenizingPattern

    Methods inherited from class org.languagetool.rules.spelling.SpellingCheckRule

    acceptedInAlternativeLanguage, acceptPhrases, addIgnoreTokens, addIgnoreWords, addProhibitedWords, addSuggestionsToRuleMatch, createWrongSplitMatch, expandLine, filterDupes, filterSuggestions, getAdditionalProhibitFileNames, getAdditionalSpellingFileNames, getAdditionalSuggestions, getAlternativeLangSpellingRules, getAntiPatterns, getIgnoreFileName, getLanguageVariantSpellingFileName, getProhibitFileName, ignoreToken, ignoreWord, init, isDictionaryBasedSpellingRule, isEMail, isProhibited, isUrl, reorderSuggestions, setConsiderIgnoreWords, setConvertsCase, startsWithIgnoredWord

    Methods inherited from class org.languagetool.rules.Rule

    addExamplePair, estimateContextForSureMatch, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getErrorTriggeringExamples, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getSentenceWithImmunization, getUrl, hasConfigurableValue, isDefaultOff, isDefaultTempOff, isOfficeDefaultOff, isOfficeDefaultOn, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setErrorTriggeringExamples, setIncorrectExamples, setLocQualityIssueType, setOfficeDefaultOff, setOfficeDefaultOn, setUrl, supportsLanguage, toRuleMatchArray

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • dictFilename

      private String dictFilename
    • SPELLING_FILE

      private static final String SPELLING_FILE
      See Also:
    • PARTICULA_INICIAL

      private static final Pattern PARTICULA_INICIAL
    • PREFIX_AMB_ESPAI

      private static final Pattern PREFIX_AMB_ESPAI
    • APOSTROF_INICI_VERBS

      private static final Pattern APOSTROF_INICI_VERBS
    • APOSTROF_INICI_NOM_SING

      private static final Pattern APOSTROF_INICI_NOM_SING
    • APOSTROF_INICI_NOM_PLURAL

      private static final Pattern APOSTROF_INICI_NOM_PLURAL
    • APOSTROF_FINAL

      private static final Pattern APOSTROF_FINAL
    • GUIONET_FINAL

      private static final Pattern GUIONET_FINAL
    • VERB_INDSUBJ

      private static final Pattern VERB_INDSUBJ
    • NOM_SING

      private static final Pattern NOM_SING
    • NOM_PLURAL

      private static final Pattern NOM_PLURAL
    • VERB_INFGERIMP

      private static final Pattern VERB_INFGERIMP
    • tagger

      private CatalanTagger tagger
  • Constructor Details

    • MorfologikCatalanSpellerRule

      public MorfologikCatalanSpellerRule(ResourceBundle messages, org.languagetool.Language language, org.languagetool.UserConfig userConfig, List<org.languagetool.Language> altLanguages) throws IOException
      Throws:
      IOException
  • Method Details

    • getFileName

      public String getFileName()
      Specified by:
      getFileName in class org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule
    • getSpellingFileName

      public String getSpellingFileName()
      Overrides:
      getSpellingFileName in class org.languagetool.rules.spelling.SpellingCheckRule
    • getId

      public String getId()
      Specified by:
      getId in class org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule
    • useInOffice

      public boolean useInOffice()
      Overrides:
      useInOffice in class org.languagetool.rules.Rule
    • orderSuggestions

      protected List<String> orderSuggestions(List<String> suggestions, String word)
      Overrides:
      orderSuggestions in class org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule
    • getAdditionalTopSuggestions

      protected List<String> getAdditionalTopSuggestions(List<String> suggestions, String word) throws IOException
      Overrides:
      getAdditionalTopSuggestions in class org.languagetool.rules.spelling.SpellingCheckRule
      Throws:
      IOException
    • findSuggestion

      private String findSuggestion(String suggestion, String word, Pattern wordPattern, Pattern postagPattern, int suggestionPosition, String separator) throws IOException
      Throws:
      IOException
    • matchPostagRegexp

      private boolean matchPostagRegexp(org.languagetool.AnalyzedTokenReadings aToken, Pattern pattern)
      Match POS tag with regular expression