Class ComplexAdjectiveConcordanceRule

java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.ca.ComplexAdjectiveConcordanceRule

public class ComplexAdjectiveConcordanceRule extends org.languagetool.rules.Rule
This rule checks if an adjective doesn't agree with the previous noun and at the same time it doesn't agree with any of the previous words. Takes care of some exceptions.
  • Field Details

    • NOM

      private static final Pattern NOM
      Patterns
    • NOM_MS

      private static final Pattern NOM_MS
    • NOM_FS

      private static final Pattern NOM_FS
    • NOM_MP

      private static final Pattern NOM_MP
    • NOM_FP

      private static final Pattern NOM_FP
    • NOM_CS

      private static final Pattern NOM_CS
    • NOM_CP

      private static final Pattern NOM_CP
    • NOM_DET

      private static final Pattern NOM_DET
    • _GN_

      private static final Pattern _GN_
    • _GN_MS

      private static final Pattern _GN_MS
    • _GN_FS

      private static final Pattern _GN_FS
    • _GN_MP

      private static final Pattern _GN_MP
    • _GN_FP

      private static final Pattern _GN_FP
    • _GN_CS

      private static final Pattern _GN_CS
    • _GN_CP

      private static final Pattern _GN_CP
    • DET

      private static final Pattern DET
    • DET_CS

      private static final Pattern DET_CS
    • DET_MS

      private static final Pattern DET_MS
    • DET_FS

      private static final Pattern DET_FS
    • DET_MP

      private static final Pattern DET_MP
    • DET_FP

      private static final Pattern DET_FP
    • GN_MS

      private static final Pattern GN_MS
    • GN_FS

      private static final Pattern GN_FS
    • GN_MP

      private static final Pattern GN_MP
    • GN_FP

      private static final Pattern GN_FP
    • GN_CP

      private static final Pattern GN_CP
    • GN_CS

      private static final Pattern GN_CS
    • ADJECTIU

      private static final Pattern ADJECTIU
    • ADJECTIU_MS

      private static final Pattern ADJECTIU_MS
    • ADJECTIU_FS

      private static final Pattern ADJECTIU_FS
    • ADJECTIU_MP

      private static final Pattern ADJECTIU_MP
    • ADJECTIU_FP

      private static final Pattern ADJECTIU_FP
    • ADJECTIU_CP

      private static final Pattern ADJECTIU_CP
    • ADJECTIU_CS

      private static final Pattern ADJECTIU_CS
    • ADJECTIU_S

      private static final Pattern ADJECTIU_S
    • ADJECTIU_P

      private static final Pattern ADJECTIU_P
    • ADVERBI

      private static final Pattern ADVERBI
    • CONJUNCIO

      private static final Pattern CONJUNCIO
    • PUNTUACIO

      private static final Pattern PUNTUACIO
    • LOC_ADV

      private static final Pattern LOC_ADV
    • ADVERBIS_ACCEPTATS

      private static final Pattern ADVERBIS_ACCEPTATS
    • CONCORDA

      private static final Pattern CONCORDA
    • UPPERCASE

      private static final Pattern UPPERCASE
    • COORDINACIO

      private static final Pattern COORDINACIO
    • COORDINACIO_IONI

      private static final Pattern COORDINACIO_IONI
    • KEEP_COUNT

      private static final Pattern KEEP_COUNT
    • KEEP_COUNT2

      private static final Pattern KEEP_COUNT2
    • STOP_COUNT

      private static final Pattern STOP_COUNT
    • PREPOSICIONS

      private static final Pattern PREPOSICIONS
    • PREPOSICIO_CANVI_NIVELL

      private static final Pattern PREPOSICIO_CANVI_NIVELL
    • VERB

      private static final Pattern VERB
    • GV

      private static final Pattern GV
    • EXCEPCIONS_PARTICIPI

      private static final Pattern EXCEPCIONS_PARTICIPI
    • EXCEPCIONS_PREVIA

      private static final Pattern EXCEPCIONS_PREVIA
    • EXCEPCIONS_PREVIA_POSTAG

      private static final Pattern EXCEPCIONS_PREVIA_POSTAG
    • TOPONIM

      private static final Pattern TOPONIM
    • ORDINAL

      private static final Pattern ORDINAL
    • adverbAppeared

      boolean adverbAppeared
    • conjunctionAppeared

      boolean conjunctionAppeared
    • punctuationAppeared

      boolean punctuationAppeared
  • Constructor Details

  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in class org.languagetool.rules.Rule
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in class org.languagetool.rules.Rule
    • match

      public org.languagetool.rules.RuleMatch[] match(org.languagetool.AnalyzedSentence sentence)
      Specified by:
      match in class org.languagetool.rules.Rule
    • keepCounting

      private boolean keepCounting(org.languagetool.AnalyzedTokenReadings aTr)
    • initializeApparitions

      private void initializeApparitions()
    • updateApparitions

      private void updateApparitions(org.languagetool.AnalyzedTokenReadings aTr)
    • matchPostagRegexp

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

      private boolean matchRegexp(String s, Pattern pattern)
      Match String with regular expression