Uses of Class
org.languagetool.rules.Rule
-
-
Uses of Rule in org.languagetool
Methods in org.languagetool that return types with arguments of type Rule Modifier and Type Method Description List<Rule>
JLanguageTool. getAllActiveOfficeRules()
Works like getAllActiveRules but overrides defaults by office defaultsList<Rule>
JLanguageTool. getAllActiveRules()
Get all active (not disabled) rules for the current language that are built-in or that have been added using e.g.List<Rule>
JLanguageTool. getAllRules()
Get all rules for the current language that are built-in or that have been added usingJLanguageTool.addRule(Rule)
.List<Rule>
Language. getRelevantLanguageModelCapableRules(ResourceBundle messages, @Nullable LanguageModel languageModel, UserConfig userConfig, Language motherTongue, List<Language> altLanguages)
Get a list of rules that can optionally use aLanguageModel
.List<Rule>
Language. getRelevantLanguageModelRules(ResourceBundle messages, LanguageModel languageModel)
Get a list of rules that require aLanguageModel
.List<Rule>
Language. getRelevantNeuralNetworkModels(ResourceBundle messages, File modelDir)
Get a list of rules that load trained neural networks.abstract List<Rule>
Language. getRelevantRules(ResourceBundle messages, UserConfig userConfig, Language motherTongue, List<Language> altLanguages)
Get the rules classes that should run for texts in this language.List<Rule>
Language. getRelevantRulesGlobalConfig(ResourceBundle messages, GlobalConfig globalConfig, UserConfig userConfig, Language motherTongue, List<Language> altLanguages)
Get the rules classes that should run for texts in this language.List<Rule>
Language. getRelevantWord2VecModelRules(ResourceBundle messages, Word2VecModel word2vecModel)
Get a list of rules that require aWord2VecModel
.Methods in org.languagetool with parameters of type Rule Modifier and Type Method Description void
JLanguageTool. addRule(Rule rule)
Add a rule to be used by the next call to the check methods likeJLanguageTool.check(String)
.Method parameters in org.languagetool with type arguments of type Rule Modifier and Type Method Description List<RuleMatch>
JLanguageTool. checkAnalyzedSentence(JLanguageTool.ParagraphHandling paraMode, List<Rule> rules, AnalyzedSentence analyzedSentence)
This is an internal method that's public only for technical reasons, please use one of theJLanguageTool.check(String)
methods instead. -
Uses of Rule in org.languagetool.noop
Methods in org.languagetool.noop that return types with arguments of type Rule Modifier and Type Method Description List<Rule>
NoopLanguage. getRelevantRules(ResourceBundle messages, UserConfig userConfig, Language motherTongue, List<Language> altLanguages)
-
Uses of Rule in org.languagetool.rules
Subclasses of Rule in org.languagetool.rules Modifier and Type Class Description class
AbstractCompoundRule
Checks that compounds (if in the list) are not written as separate words.class
AbstractDashRule
Another use of the compounds file -- check for compounds written with dashes instead of hyphens (for example, Rabka — Zdrój).class
AbstractFillerWordsRule
A rule that gives hints about the use of filler words.class
AbstractPunctuationCheckRule
A rule that matches "..", "::", "-," but not "...", "!..", "?!!", ",-" etc.class
AbstractSimpleReplaceRule
A rule that matches words which should not be used and suggests correct ones instead.class
AbstractSimpleReplaceRule2
A rule that matches words which should not be used and suggests correct ones instead.class
AbstractSpaceBeforeRule
An abstract rule that checks if there is a missing space before some conjunctions.class
AbstractStyleRepeatedWordRule
An abstract rule checks the appearance of same words in a sentence or in two consecutive sentences.class
AbstractUnitConversionRule
Base class providing support for detecting, parsing and converting between measurements in different unitsclass
AbstractWordCoherencyRule
A rule that matches words for which two different spellings are used throughout the document.class
AdvancedWordRepeatRule
Rule for detecting same words in the sentence but not just in a row.class
CommaWhitespaceRule
A rule that matches periods, commas and closing parenthesis preceded by whitespace and opening parenthesis followed by whitespace.class
DemoRule
A simple demo rule as an example for how to implement your own Java-based rule in LanguageTool.class
DoublePunctuationRule
A rule that matches ".." (but not "..." etc) and ",,".class
EmptyLineRule
A rule that checks for empty lines.class
GenericUnpairedBracketsRule
Rule that finds unpaired quotes, brackets etc.class
LongParagraphRule
A rule that warns on long paragraphs.class
LongSentenceRule
A rule that warns on long sentences.class
MultipleWhitespaceRule
Check if there is duplicated whitespace in a sentence.class
OpenNMTRule
Queries an OpenNMT server started like this:th tools/rest_translation_server.lua -replace_unk -model ...
class
ParagraphRepeatBeginningRule
Check if to paragraphs begin with the same word.class
PunctuationMarkAtParagraphEnd
A rule that checks for a punctuation mark at the end of a paragraph.class
ReadabilityRule
A rule that checks the readability of English text (using the Flesch-Reading-Ease Formula) If tooEasyTest == true, the rule tests if paragraph level > level (readability is too easy) If tooEasyTest == false, the rule tests if paragraph level < level (readability is too difficult)class
SentenceWhitespaceRule
Checks that there's whitespace between sentences.class
TextLevelRule
A rule that considers the complete text, not just one sentence after the other.class
UppercaseSentenceStartRule
Checks that a sentence starts with an uppercase letter.class
WhiteSpaceAtBeginOfParagraph
A rule that checks for WhiteSpaces at the begin of a paragraphclass
WhiteSpaceBeforeParagraphEnd
A rule that checks for a whitespace at the end of a paragraphclass
WhitespaceBeforePunctuationRule
A rule that matches several punctuation signs such as:
;
and%
preceded by whitespace.class
WordRepeatBeginningRule
Check if three successive sentences begin with the same word, e.g.class
WordRepeatRule
Check if a word is repeated, e.g.class
WrongWordInContextRule
Check if there is a confusion of two words (which might have a similar spelling) depending on the context.Methods in org.languagetool.rules that return Rule Modifier and Type Method Description Rule
RuleMatch. getRule()
Constructors in org.languagetool.rules with parameters of type Rule Constructor Description RuleMatch(Rule rule, int fromPos, int toPos, String message)
Deprecated.use a constructor that also takes anAnalyzedSentence
parameter (deprecated since 4.0)RuleMatch(Rule rule, int fromPos, int toPos, String message, String shortMessage, boolean startWithUppercase, String suggestionsOutMsg)
Deprecated.use a constructor that also takes anAnalyzedSentence
parameter (deprecated since 4.0)RuleMatch(Rule rule, AnalyzedSentence sentence, int fromPos, int toPos, String message)
Creates a RuleMatch object, taking the rule that triggered this match, position of the match and an explanation message.RuleMatch(Rule rule, AnalyzedSentence sentence, int fromPos, int toPos, String message, String shortMessage)
Creates a RuleMatch object, taking the rule that triggered this match, position of the match and an explanation message.RuleMatch(Rule rule, AnalyzedSentence sentence, int fromPos, int toPos, String message, String shortMessage, boolean startWithUppercase, String suggestionsOutMsg)
Creates a RuleMatch object, taking the rule that triggered this match, position of the match and an explanation message.SuggestionFilter(Rule rule, Language lang)
-
Uses of Rule in org.languagetool.rules.bitext
Subclasses of Rule in org.languagetool.rules.bitext Modifier and Type Class Description class
BitextRule
Abstract bitext rule class.class
DifferentLengthRule
Checks if the translation has a really different length than the source (smaller than 30% or longer by 250%).class
DifferentPunctuationRule
Checks if the translation has the same ending punctuation as the source.class
SameTranslationRule
Checks if the translation for segments that have more than two words is different. -
Uses of Rule in org.languagetool.rules.neuralnetwork
Subclasses of Rule in org.languagetool.rules.neuralnetwork Modifier and Type Class Description class
NeuralNetworkRule
Methods in org.languagetool.rules.neuralnetwork that return types with arguments of type Rule Modifier and Type Method Description static List<Rule>
NeuralNetworkRuleCreator. createRules(ResourceBundle messages, Language language, Word2VecModel word2vecModel)
-
Uses of Rule in org.languagetool.rules.ngrams
Subclasses of Rule in org.languagetool.rules.ngrams Modifier and Type Class Description class
ConfusionProbabilityRule
LanguageTool's homophone confusion check that uses ngram lookups to decide which word in a confusion set (fromconfusion_sets.txt
) suits best.class
NgramProbabilityRule
LanguageTool's probability check that uses ngram lookups to decide if an ngram of the input text is so rare in our ngram index that it should be considered an error. -
Uses of Rule in org.languagetool.rules.patterns
Subclasses of Rule in org.languagetool.rules.patterns Modifier and Type Class Description class
AbstractPatternRule
An Abstract Pattern Rule that describes a pattern of words or part-of-speech tags used for PatternRule and DisambiguationPatternRule.class
FalseFriendPatternRule
A pattern rule for finding false friends.class
PatternRule
A Rule that describes a language error as a simple pattern of words or of part-of-speech tags.class
RegexPatternRule
Matches 'regexp' elements from XML rules against sentences. -
Uses of Rule in org.languagetool.rules.patterns.bitext
Subclasses of Rule in org.languagetool.rules.patterns.bitext Modifier and Type Class Description class
BitextPatternRule
A bitext pattern rule class. -
Uses of Rule in org.languagetool.rules.spelling
Subclasses of Rule in org.languagetool.rules.spelling Modifier and Type Class Description class
SpellingCheckRule
An abstract rule for spellchecking rules.class
SymSpellRule
spell checking using SymSpell algorithm, implementation from https://github.com/Lundez/JavaSymSpell in org.languagetool.rules.spelling.symspell.implementation potential faster alternative to Morfologik, especially in generating suggestionsMethods in org.languagetool.rules.spelling that return Rule Modifier and Type Method Description Rule
RuleWithLanguage. getRule()
-
Uses of Rule in org.languagetool.rules.spelling.hunspell
Subclasses of Rule in org.languagetool.rules.spelling.hunspell Modifier and Type Class Description class
CompoundAwareHunspellRule
A spell checker that combines Hunspell und Morfologik spell checking to support compound words and offer fast suggestions for some misspelled compound words.class
HunspellNoSuggestionRule
LikeHunspellRule
, but does not offer suggestions for incorrect words as that is very slow with Hunspell.class
HunspellRule
A hunspell-based spellchecking-rule. -
Uses of Rule in org.languagetool.rules.spelling.morfologik
Subclasses of Rule in org.languagetool.rules.spelling.morfologik Modifier and Type Class Description class
MorfologikSpellerRule
-
Uses of Rule in org.languagetool.tagging.disambiguation.rules
Subclasses of Rule in org.languagetool.tagging.disambiguation.rules Modifier and Type Class Description class
DisambiguationPatternRule
A Rule that describes a pattern of words or part-of-speech tags used for disambiguation. -
Uses of Rule in org.languagetool.tools
Methods in org.languagetool.tools with parameters of type Rule Modifier and Type Method Description static int
Tools. profileRulesOnLine(String contents, JLanguageTool lt, Rule rule)
-