Package org.languagetool.rules

Examples of org.languagetool.rules.Category


  private AnalyzedTokenReadings finiteVerb;

  public VerbAgreementRule(final ResourceBundle messages, German language) {
    this.language = language;
    if (messages != null) {
      super.setCategory(new Category(messages.getString("category_grammar")));
    }
    addExamplePair(Example.wrong("Ich <marker>bist</marker> über die Entwicklung sehr froh."),
                   Example.fixed("Ich <marker>bin</marker> über die Entwicklung sehr froh."));
  }
View Full Code Here


  ));
   
  public AgreementRule(final ResourceBundle messages, German language) {
    this.language = language;
    if (messages != null) {
      super.setCategory(new Category(messages.getString("category_grammar")));
    }
    addExamplePair(Example.wrong("<marker>Der Haus</marker> wurde letztes Jahr gebaut."),
                   Example.fixed("<marker>Das Haus</marker> wurde letztes Jahr gebaut"));
  }
View Full Code Here

  private final GermanTagger tagger;
 
  public CaseRule(final ResourceBundle messages, final German german) {
    if (messages != null) {
      super.setCategory(new Category(messages.getString("category_case")));
    }
    this.tagger = (GermanTagger) german.getTagger();
    addExamplePair(Example.wrong("<marker>Das laufen</marker> fällt mir schwer."),
                   Example.fixed("<marker>Das Laufen</marker> fällt mir schwer."));
  }
View Full Code Here

      "Штрассе", "Авеню", "Стріт"
      ));

  public TokenAgreementRule(final ResourceBundle messages) throws IOException {
    if (messages != null) {
      super.setCategory(new Category(messages.getString("category_misc")));
    }
  }
View Full Code Here

              .append(" offset=\"").append(match.getFromPos()).append('"')
              .append(" errorlength=\"").append(match.getToPos() - match.getFromPos()).append('"');
      if (match.getRule().getUrl() != null) {
        xml.append(" url=\"").append(escapeXMLForAPIOutput(match.getRule().getUrl().toString())).append('"');
      }
      Category category = match.getRule().getCategory();
      if (category != null) {
        xml.append(" category=\"").append(escapeXMLForAPIOutput(category.getName())).append('"');
      }
      ITSIssueType type = match.getRule().getLocQualityIssueType();
      if (type != null) {
        xml.append(" locqualityissuetype=\"").append(escapeXMLForAPIOutput(type.toString())).append('"');
      }
View Full Code Here

  private static final Pattern CYRILLIC_ONLY = Pattern.compile(".*[бвгґдєжзйїлнпфцчшщьюяБГҐДЄЖЗИЙЇЛПФЦЧШЩЬЮЯ].*");
  private static final Pattern LATIN_ONLY = Pattern.compile(".*[bdfghjlqrsvzDFGLNQRSUVZ].*");

  public MixedAlphabetsRule(final ResourceBundle messages) throws IOException {
    if (messages != null) {
      super.setCategory(new Category(messages.getString("category_misc")));
    }
  }
View Full Code Here

  }

  public SimpleReplaceRule(final ResourceBundle messages) throws IOException {
    super(messages);
    setLocQualityIssueType(ITSIssueType.Misspelling);
    setCategory(new Category("Prawdopodobne literówki"));
    setCheckLemmas(false);
    addExamplePair(Example.wrong("Uspokój <marker>sei</marker>."),
                   Example.fixed("Uspokój <marker>się</marker>."));
  }
View Full Code Here

    }

  public MorfologikPolishSpellerRule(ResourceBundle messages,
                                     Language language) throws IOException {
    super(messages, language);
    setCategory(new Category("Prawdopodobne literówki"));
    addExamplePair(Example.wrong("To jest zdanie z <marker>bledem</marker>"),
                   Example.fixed("To jest zdanie z <marker>błędem</marker>."));
  }
View Full Code Here

// <token postag="P0.*|PP.*" postag_regexp="yes"><exception postag="_GN_.*" postag_regexp="yes"/><exception regexp="yes">jo|mi|tu|ella?|nosaltres|vosaltres|elle?s|vost[èé]s?|vós</exception><exception postag="allow_saxon_genitive">'s</exception></token>
 
  
  public ReflexiveVerbsRule(ResourceBundle messages) throws IOException {
    if (messages != null) {
      super.setCategory(new Category("Verbs"));
    }
    setLocQualityIssueType(ITSIssueType.Grammar);
  }
View Full Code Here

  }
 
  public SimpleReplaceVerbsRule(final ResourceBundle messages) throws IOException {
    super.setLocQualityIssueType(ITSIssueType.Misspelling);
    if (messages != null) {
      super.setCategory(new Category("Errors ortogràfics"));
    }
    wrongWords = loadWords(JLanguageTool.getDataBroker()
        .getFromRulesDirAsStream(getFileName()));
    tagger = new CatalanTagger();
    synth = new CatalanSynthesizer();
View Full Code Here

TOP

Related Classes of org.languagetool.rules.Category

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.