Class MorfologikCatalanSpellerRule


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

      Fields 
      Modifier and Type Field Description
      private static java.util.regex.Pattern APOSTROF_FINAL  
      private static java.util.regex.Pattern APOSTROF_INICI_NOM_PLURAL  
      private static java.util.regex.Pattern APOSTROF_INICI_NOM_SING  
      private static java.util.regex.Pattern APOSTROF_INICI_VERBS  
      private java.lang.String dictFilename  
      private static java.util.regex.Pattern GUIONET_FINAL  
      private static java.util.regex.Pattern NOM_PLURAL  
      private static java.util.regex.Pattern NOM_SING  
      private static java.util.regex.Pattern PARTICULA_INICIAL  
      private static java.util.regex.Pattern PREFIX_AMB_ESPAI  
      private static java.lang.String SPELLING_FILE  
      private CatalanTagger tagger  
      private static java.util.regex.Pattern VERB_INDSUBJ  
      private static java.util.regex.Pattern VERB_INFGERIMP  
      • 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​(java.util.ResourceBundle messages, org.languagetool.Language language, org.languagetool.UserConfig userConfig, java.util.List<org.languagetool.Language> altLanguages)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.lang.String findSuggestion​(java.lang.String suggestion, java.lang.String word, java.util.regex.Pattern wordPattern, java.util.regex.Pattern postagPattern, int suggestionPosition, java.lang.String separator)  
      protected java.util.List<java.lang.String> getAdditionalTopSuggestions​(java.util.List<java.lang.String> suggestions, java.lang.String word)  
      java.lang.String getFileName()  
      java.lang.String getId()  
      java.lang.String getSpellingFileName()  
      private boolean matchPostagRegexp​(org.languagetool.AnalyzedTokenReadings aToken, java.util.regex.Pattern pattern)
      Match POS tag with regular expression
      protected java.util.List<java.lang.String> orderSuggestions​(java.util.List<java.lang.String> suggestions, java.lang.String word)  
      boolean useInOffice()  
      • 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 Detail

      • dictFilename

        private java.lang.String dictFilename
      • PARTICULA_INICIAL

        private static final java.util.regex.Pattern PARTICULA_INICIAL
      • PREFIX_AMB_ESPAI

        private static final java.util.regex.Pattern PREFIX_AMB_ESPAI
      • APOSTROF_INICI_VERBS

        private static final java.util.regex.Pattern APOSTROF_INICI_VERBS
      • APOSTROF_INICI_NOM_SING

        private static final java.util.regex.Pattern APOSTROF_INICI_NOM_SING
      • APOSTROF_INICI_NOM_PLURAL

        private static final java.util.regex.Pattern APOSTROF_INICI_NOM_PLURAL
      • APOSTROF_FINAL

        private static final java.util.regex.Pattern APOSTROF_FINAL
      • GUIONET_FINAL

        private static final java.util.regex.Pattern GUIONET_FINAL
      • VERB_INDSUBJ

        private static final java.util.regex.Pattern VERB_INDSUBJ
      • NOM_SING

        private static final java.util.regex.Pattern NOM_SING
      • NOM_PLURAL

        private static final java.util.regex.Pattern NOM_PLURAL
      • VERB_INFGERIMP

        private static final java.util.regex.Pattern VERB_INFGERIMP
    • Constructor Detail

      • MorfologikCatalanSpellerRule

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

      • getFileName

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

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

        public java.lang.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 java.util.List<java.lang.String> orderSuggestions​(java.util.List<java.lang.String> suggestions,
                                                                    java.lang.String word)
        Overrides:
        orderSuggestions in class org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule
      • getAdditionalTopSuggestions

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

        private java.lang.String findSuggestion​(java.lang.String suggestion,
                                                java.lang.String word,
                                                java.util.regex.Pattern wordPattern,
                                                java.util.regex.Pattern postagPattern,
                                                int suggestionPosition,
                                                java.lang.String separator)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • matchPostagRegexp

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