Package org.languagetool.rules

Examples of org.languagetool.rules.Category


  }

  public KhmerSimpleReplaceRule(final ResourceBundle messages) throws IOException {
    super(messages);
    if (messages != null) {
      super.setCategory(new Category(messages.getString("category_misc")));
    }
    wrongWords = loadWords(JLanguageTool.getDataBroker().getFromRulesDirAsStream(getFileName()));
  }
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("grammar");
  }
View Full Code Here

*/
public class KhmerWordRepeatRule extends Rule {

  public KhmerWordRepeatRule(final ResourceBundle messages, final Language language) {
    super(messages);
    super.setCategory(new Category(messages.getString("category_misc")));
  }
View Full Code Here

    return FILE_NAME;
  }
 
  public SimpleReplaceRule(final ResourceBundle messages) throws IOException {
    super(messages);
    super.setCategory(new Category("Errors ortogràfics"));
    super.setLocQualityIssueType("misspelling");
 
View Full Code Here

  private final Map<String, String> wrongWords; // e.g. "вреѿті реѿт" -> "зреѿтою"

  public KhmerWordCoherencyRule(final ResourceBundle messages) throws IOException {
    if (messages != null) {
      super.setCategory(new Category(messages.getString("category_misc")));
    }
    wrongWords = loadWords(JLanguageTool.getDataBroker().getFromRulesDirAsStream(FILE_NAME));
  }
View Full Code Here

  private static final Pattern EXCEPCIONS_PREVIA_POSTAG = Pattern.compile("_loc_meitat");

  public ComplexAdjectiveConcordanceRule(ResourceBundle messages)
      throws IOException {
    if (messages != null) {
      super.setCategory(new Category("Z) Concordances en grups nominals"));
    }
    setLocQualityIssueType("grammar");
  }
View Full Code Here

      if (disabledRules.contains(rule.getId())
          || (rule.isDefaultOff() && !enabledRules.contains(rule.getId()))) {
        continue;
      }

      final Category category = rule.getCategory();
      if (category != null && disabledCategories.contains(category.getName())) {
        continue;
      }
     
      switch (paraMode) {
        case ONLYNONPARA: {
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

  private final Map<String, AnalyzedTokenReadings> relevantWords;
  private final Map<String, AnalyzedTokenReadings> relevantWords2;

  public AccentuationCheckRule(ResourceBundle messages) throws IOException {
    if (messages != null) {
      super.setCategory(new Category(messages.getString("category_misc")));
    }
    setLocQualityIssueType("misspelling");
    relevantWords = loadWords(FILE_NAME);
    relevantWords2 = loadWords(FILE_NAME2);
  }
View Full Code Here

  // space before and after colon ':' in URL with common schemes.
  private static final Pattern urlPattern = Pattern.compile("^(file|s?ftp|finger|git|gopher|hdl|https?|shttp|imap|mailto|mms|nntp|s?news(post|reply)?|prospero|rsync|rtspu|sips?|svn|svn\\+ssh|telnet|wais)$");

  public QuestionWhitespaceRule(final ResourceBundle messages) {
    // super(messages);
    super.setCategory(new Category(messages.getString("category_misc")));
  }
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.