Package org.languagetool.rules

Examples of org.languagetool.rules.Category


    return FILE_NAME;
  }
 
  public SimpleReplaceRule(final ResourceBundle messages) throws IOException {
    super(messages);
    super.setCategory(new Category("Errors ortogràfics"));
    super.setLocQualityIssueType(ITSIssueType.Misspelling);
    this.setIgnoreTaggedWords();
 
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(ITSIssueType.Grammar);
  }
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(ITSIssueType.Grammar);
    relevantWords = loadWords(FILE_NAME);
    relevantWords2 = loadWords(FILE_NAME2);
  }
View Full Code Here

  }

  public TopoReplaceRule(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

    database.createTables();
    assertThat(database.getLatestDate(language), is(new Date(0)));
    assertThat(database.list().size(), is(0));
    assertThat(database.getCheckDates().size(), is(0));
    FakeRule rule1 = new FakeRule(1);
    rule1.setCategory(new Category("My Category"));
    RuleMatch ruleMatch = new RuleMatch(rule1, 5, 10, "my message");
    AtomFeedItem feedItem1 = new AtomFeedItem("//id1?diff=123", "title", "summary1", new Date(10000));
    WikipediaRuleMatch wikiRuleMatch1 = new WikipediaRuleMatch(language, ruleMatch, "my context", feedItem1);
    database.add(wikiRuleMatch1);
    assertThat(database.list().size(), is(1));
View Full Code Here

  }

  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

*/
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

   */
  public abstract String getFileName();

  public MorfologikSpellerRule(ResourceBundle messages, Language language) throws IOException {
    super(messages, language);
    super.setCategory(new Category(messages.getString("category_typo")));
    this.conversionLocale = conversionLocale != null ? conversionLocale : Locale.getDefault();
    init();
    setLocQualityIssueType(ITSIssueType.Misspelling);
  }
View Full Code Here

  private Pattern nonWordPattern;

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

            messages.getString("false_friend_desc") + " "
                + tokensAsString, description, messages
                .getString("false_friend"));
        rule.setCorrectExamples(correctExamples);
        rule.setIncorrectExamples(incorrectExamples);
        rule.setCategory(new Category(messages
            .getString("category_false_friend")));
        if (defaultOff) {
          rule.setDefaultOff();
        }
        rules.add(rule);
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.