@ApiStatus.Internal public abstract class RuleSet extends Object
rulesForSentence(org.languagetool.AnalyzedSentence)
), to avoid even invoking the definitely inapplicable ones.
The filtering is based on cues provided by the rules, e.g. possible token strings or lemmas in pattern rules.Constructor and Description |
---|
RuleSet() |
Modifier and Type | Method and Description |
---|---|
Set<String> |
allRuleIds() |
abstract List<Rule> |
allRules() |
static <T> List<T> |
filterList(BitSet includedIndices,
List<T> list) |
static RuleSet |
plain(List<Rule> rules) |
abstract List<Rule> |
rulesForSentence(AnalyzedSentence sentence) |
static RuleSet |
textHinted(List<? extends Rule> rules) |
static RuleSet |
textLemmaHinted(List<? extends Rule> rules) |
public abstract List<Rule> rulesForSentence(AnalyzedSentence sentence)
allRules()
that might be applicable to the given sentence.public Set<String> allRuleIds()
allRules()
public static RuleSet plain(List<Rule> rules)
rulesForSentence(org.languagetool.AnalyzedSentence)
public static RuleSet textLemmaHinted(List<? extends Rule> rules)
rulesForSentence(org.languagetool.AnalyzedSentence)
excludes rules requiring token texts or lemmas
that don't occur in the given sentencepublic static RuleSet textHinted(List<? extends Rule> rules)
rulesForSentence(org.languagetool.AnalyzedSentence)
excludes rules requiring token texts
that don't occur in the given sentence.