Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
AnalyzedSentence.copy(AnalyzedSentence sentence)
The method copies
AnalyzedSentence and returns the copy. |
AnalyzedSentence |
JLanguageTool.getAnalyzedSentence(String sentence)
Tokenizes the given
sentence into words and analyzes it,
and then disambiguates POS tags. |
AnalyzedSentence |
ResultCache.getIfPresent(org.languagetool.SimpleInputSentence key) |
AnalyzedSentence |
JLanguageTool.getRawAnalyzedSentence(String sentence)
Tokenizes the given
sentence into words and analyzes it. |
Modifier and Type | Method and Description |
---|---|
protected List<AnalyzedSentence> |
MultiThreadedJLanguageTool.analyzeSentences(List<String> sentences) |
protected List<AnalyzedSentence> |
JLanguageTool.analyzeSentences(List<String> sentences) |
List<AnalyzedSentence> |
JLanguageTool.analyzeText(String text)
Use this method if you want to access LanguageTool's otherwise
internal analysis of the text.
|
com.google.common.cache.Cache<org.languagetool.SimpleInputSentence,AnalyzedSentence> |
ResultCache.getSentenceCache() |
Modifier and Type | Method and Description |
---|---|
List<RuleMatch> |
JLanguageTool.checkAnalyzedSentence(JLanguageTool.ParagraphHandling paraMode,
List<Rule> rules,
AnalyzedSentence analyzedSentence)
Deprecated.
use one of the
JLanguageTool.check(java.lang.String) methods instead. |
List<RuleMatch> |
JLanguageTool.checkAnalyzedSentence(JLanguageTool.ParagraphHandling paraMode,
List<Rule> rules,
AnalyzedSentence analyzedSentence,
boolean checkRemoteRules)
This is an internal method that's public only for technical reasons, please use one
of the
JLanguageTool.check(String) methods instead. |
AnalyzedSentence |
AnalyzedSentence.copy(AnalyzedSentence sentence)
The method copies
AnalyzedSentence and returns the copy. |
protected void |
JLanguageTool.printSentenceInfo(AnalyzedSentence analyzedSentence) |
void |
ResultCache.put(org.languagetool.SimpleInputSentence key,
AnalyzedSentence aSentence) |
protected void |
JLanguageTool.rememberUnknownWords(AnalyzedSentence analyzedText) |
Modifier and Type | Method and Description |
---|---|
protected CheckResults |
JLanguageTool.checkInternal(AnnotatedText annotatedText,
JLanguageTool.ParagraphHandling paraMode,
RuleMatchListener listener,
JLanguageTool.Mode mode,
JLanguageTool.Level level,
Long textSessionID,
List<String> sentences,
List<AnalyzedSentence> analyzedSentences) |
protected CheckResults |
JLanguageTool.checkInternal(AnnotatedText annotatedText,
JLanguageTool.ParagraphHandling paraMode,
RuleMatchListener listener,
JLanguageTool.Mode mode,
JLanguageTool.Level level,
Set<ToneTag> toneTags,
Long textSessionID,
List<String> sentences,
List<AnalyzedSentence> analyzedSentences) |
protected List<org.languagetool.JLanguageTool.SentenceData> |
JLanguageTool.computeSentenceData(List<AnalyzedSentence> analyzedSentences,
List<String> texts) |
protected void |
JLanguageTool.fetchRemoteRuleResults(long deadlineStartNanos,
JLanguageTool.Mode mode,
JLanguageTool.Level level,
List<AnalyzedSentence> analyzedSentences,
List<RuleMatch> remoteMatches,
List<FutureTask<RemoteRuleResult>> remoteRuleTasks,
List<RemoteRule> remoteRules,
List<Integer> requestSize,
Map<Integer,List<RuleMatch>> cachedResults,
Map<Integer,Integer> matchOffset,
AnnotatedText annotatedText,
Long textSessionID,
Set<ToneTag> toneTags) |
protected CheckResults |
MultiThreadedJLanguageTool.performCheck(List<AnalyzedSentence> analyzedSentences,
List<String> sentenceTexts,
RuleSet ruleSet,
JLanguageTool.ParagraphHandling paraMode,
AnnotatedText annotatedText,
RuleMatchListener listener,
JLanguageTool.Mode mode,
JLanguageTool.Level level,
boolean checkRemoteRules,
Set<ToneTag> toneTags) |
protected CheckResults |
JLanguageTool.performCheck(List<AnalyzedSentence> analyzedSentences,
List<String> sentenceTexts,
RuleSet ruleSet,
JLanguageTool.ParagraphHandling paraMode,
AnnotatedText annotatedText,
RuleMatchListener listener,
JLanguageTool.Mode mode,
JLanguageTool.Level level,
boolean checkRemoteRules,
Set<ToneTag> toneTags) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
MatchingSentence.getAnalyzedSentence() |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
NoopDisambiguator.disambiguate(AnalyzedSentence input) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
NoopDisambiguator.disambiguate(AnalyzedSentence input) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
SwJLanguageTool.getAnalyzedSentence(String sentence)
Analyze sentence
This Method may be used only for local checks
use local lt for remote checks
|
Modifier and Type | Method and Description |
---|---|
List<AnalyzedSentence> |
SwJLanguageTool.analyzeText(String text)
Analyze text
This Method may be used only for local checks
use local lt for remote checks
|
Modifier and Type | Method and Description |
---|---|
List<AnalyzedSentence> |
StatAnCache.getAnalysedParagraph(int n) |
List<List<AnalyzedSentence>> |
StatAnCache.getAnalysedParagraphsfrom(int from,
int to) |
Modifier and Type | Method and Description |
---|---|
static AnalyzedSentence |
GRPCUtils.fromGRPC(MLServerProto.AnalyzedSentence sentence) |
AnalyzedSentence |
RuleMatch.getSentence() |
protected AnalyzedSentence |
Rule.getSentenceWithImmunization(AnalyzedSentence sentence)
To be called from
Rule.match(AnalyzedSentence) for rules that want
Rule.getAntiPatterns() to be considered. |
Modifier and Type | Method and Description |
---|---|
Set<AnalyzedSentence> |
RemoteRuleResult.matchedSentences() |
Set<AnalyzedSentence> |
RemoteRuleResult.processedSentences() |
Modifier and Type | Method and Description |
---|---|
protected RuleMatch |
AbstractSimpleReplaceRule.createRuleMatch(AnalyzedTokenReadings tokenReadings,
List<String> replacements,
AnalyzedSentence sentence,
String originalTokenStr) |
protected RuleMatch |
WordRepeatRule.createRuleMatch(String prevToken,
String token,
int prevPos,
int pos,
String msg,
AnalyzedSentence sentence) |
protected boolean |
AbstractUnitConversionRule.detectNumberRange(AnalyzedSentence sentence,
Matcher matcher) |
static List<RuleMatch> |
RemoteRuleFilters.filterMatches(Language lang,
AnalyzedSentence sentence,
List<RuleMatch> matches) |
protected List<RuleMatch> |
AbstractSimpleReplaceRule.findMatches(AnalyzedTokenReadings tokenReadings,
AnalyzedSentence sentence) |
static void |
RemoteRule.fixMatchOffsets(AnalyzedSentence sentence,
List<RuleMatch> matches)
Adapt match positions so that results from languages that thread emojis, etc. as length 1
work for Java and match the normal offsets we use
JavaScript also behaves like Java, so most clients will expect this behavior;
but servers used for RemoteRules will often be written in Python (e.g. to access ML frameworks)
based on offsetByCodePoints since codePointCount can be confusing,
e.g. "👪".codePointCount(0,2) == 1, but length is 2
Java substring methods use this length (which can be >1 for a single character)
whereas Python 3 indexing/slicing and len() in strings treat them as a single character
so "😁foo".length() == 5, but len("😁foo") == 4;
"😁foo".substring(2,5) == "foo" but "😁foo"[1:4] == 'foo'
|
static RuleMatch |
GRPCUtils.fromGRPC(MLServerProto.Match m,
AnalyzedSentence s) |
protected abstract String |
GRPCRule.getMessage(MLServerProto.Match match,
AnalyzedSentence sentence)
messages can be provided by the ML server or the Java client
fill them in here or leave this empty if the server takes care of it
|
protected AnalyzedSentence |
Rule.getSentenceWithImmunization(AnalyzedSentence sentence)
To be called from
Rule.match(AnalyzedSentence) for rules that want
Rule.getAntiPatterns() to be considered. |
boolean |
WordRepeatBeginningRule.isSentenceException(AnalyzedSentence sentence) |
RuleMatch[] |
AbstractSpaceBeforeRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
WrongWordInContextRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
DemoRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
FakeRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
GRPCRule.GRPCSubRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
AbstractPunctuationCheckRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
AbstractCompoundRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
AbstractUnitConversionRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
AbstractCheckCaseRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
AbstractDashRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
AbstractSimpleReplaceRule2.match(AnalyzedSentence sentence) |
RuleMatch[] |
SpecificIdRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
RemoteRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
WordRepeatRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
TextLevelRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
AbstractSpecificCaseRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
WhitespaceBeforePunctuationRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
WhiteSpaceAtBeginOfParagraph.match(AnalyzedSentence sentence) |
RuleMatch[] |
CommaWhitespaceRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
AdvancedWordRepeatRule.match(AnalyzedSentence sentence) |
abstract RuleMatch[] |
Rule.match(AnalyzedSentence sentence)
Check whether the given sentence matches this error rule, i.e. whether it
contains the error detected by this rule.
|
RuleMatch[] |
AbstractSimpleReplaceRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
DoublePunctuationRule.match(AnalyzedSentence sentence) |
List<RuleMatch> |
RemoteRuleResult.matchesForSentence(AnalyzedSentence sentence)
get matches for a specific sentence
|
protected boolean |
GenericUnpairedBracketsRule.preventMatch(AnalyzedSentence sentence) |
static MLServerProto.AnalyzedSentence |
GRPCUtils.toGRPC(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
List<RuleMatch> |
GRPCPostProcessing.filter(List<AnalyzedSentence> sentences,
List<RuleMatch> ruleMatches,
Long textSessionID,
boolean inputLogging) |
RuleMatch[] |
WhiteSpaceBeforeParagraphEnd.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
EmptyLineRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
AbstractStyleRepeatedWordRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
ParagraphRepeatBeginningRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
ReadabilityRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
AbstractStyleTooOftenUsedWordRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
PunctuationMarkAtParagraphEnd2.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
AbstractRepeatedWordsRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
AbstractStatisticStyleRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
UppercaseSentenceStartRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
LongSentenceRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
WordRepeatBeginningRule.match(List<AnalyzedSentence> sentences) |
abstract RuleMatch[] |
TextLevelRule.match(List<AnalyzedSentence> sentences)
Deprecated.
use
TextLevelRule.match(List, AnnotatedText) instead |
RuleMatch[] |
PunctuationMarkAtParagraphEnd.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
GenericUnpairedBracketsRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
SentenceWhitespaceRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
MultipleWhitespaceRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
AbstractFillerWordsRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
AbstractWordCoherencyRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
AbstractStatisticSentenceStyleRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
LongParagraphRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
TextLevelRule.match(List<AnalyzedSentence> sentences,
AnnotatedText annotatedText) |
protected RemoteRule.RemoteRequest |
GRPCRule.prepareRequest(List<AnalyzedSentence> sentences,
Long textSessionId) |
protected RemoteRule.RemoteRequest |
TestRemoteRule.prepareRequest(List<AnalyzedSentence> sentences,
Long textSessionId) |
protected RemoteRule.RemoteRequest |
BERTSuggestionRanking.prepareRequest(List<AnalyzedSentence> sentences,
Long textSessionId) |
protected abstract RemoteRule.RemoteRequest |
RemoteRule.prepareRequest(List<AnalyzedSentence> sentences,
Long textSessionId)
run local preprocessing steps (or just store sentences)
|
FutureTask<RemoteRuleResult> |
RemoteRule.run(List<AnalyzedSentence> sentences) |
FutureTask<RemoteRuleResult> |
RemoteRule.run(List<AnalyzedSentence> sentences,
Long textSessionId) |
protected List<RuleMatch> |
GRPCPostProcessing.runPostprocessing(List<AnalyzedSentence> sentences,
List<RuleMatch> ruleMatches,
Long textSessionID,
boolean inputLogging,
int chars) |
Constructor and Description |
---|
RuleMatch(Rule rule,
AnalyzedSentence sentence,
int fromPos,
int toPos,
int patternStartPos,
int patternEndPos,
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,
int patternFromPos,
int patternToPos,
String message,
String shortMessage,
boolean startWithUppercase,
boolean isAllUppercase,
String suggestionsOutMsg,
boolean setOriginalErrorStr)
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,
int patternFromPos,
int patternToPos,
String message,
String shortMessage,
boolean startWithUppercase,
String suggestionsOutMsg) |
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,
List<String> suggestions)
Create a rule match with any suggestions in the message overridden by the given suggestions
|
Constructor and Description |
---|
AnalyzedMLRuleRequest(List<MLServerProto.AnalyzedMatchRequest> requests,
List<AnalyzedSentence> sentences) |
MLRuleRequest(List<MLServerProto.MatchRequest> requests,
List<AnalyzedSentence> sentences,
Long textSessionId) |
RemoteRuleResult(boolean remote,
boolean success,
List<RuleMatch> matches,
List<AnalyzedSentence> processedSentences) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
ArabicTransVerbRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
ArabicInflectedOneWordReplaceRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
BitextRule.match(AnalyzedSentence sentence)
This method makes no sense for bitext, thus it always returns
null . |
abstract RuleMatch[] |
BitextRule.match(AnalyzedSentence sourceText,
AnalyzedSentence targetText) |
RuleMatch[] |
DifferentLengthRule.match(AnalyzedSentence sourceText,
AnalyzedSentence targetText) |
RuleMatch[] |
SameTranslationRule.match(AnalyzedSentence sourceText,
AnalyzedSentence targetText) |
RuleMatch[] |
DifferentPunctuationRule.match(AnalyzedSentence sourceText,
AnalyzedSentence targetText) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
TopoReplaceRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
PronomFebleDuplicateRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
SimpleReplaceVerbsRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
AbstractSimpleReplaceLemmasRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
ReplaceOperationNamesRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
CatalanUnpairedQuestionMarksRule.match(List<AnalyzedSentence> sentences) |
Modifier and Type | Method and Description |
---|---|
protected RuleMatch |
GermanSpellerRule.createWrongSplitMatch(AnalyzedSentence sentence,
List<RuleMatch> ruleMatchesSoFar,
int pos,
String coveredWord,
String suggestion1,
String suggestion2,
int prevPos) |
protected boolean |
GermanSpellerRule.isQuotedCompound(AnalyzedSentence analyzedSentence,
int idx,
String token) |
RuleMatch[] |
CompoundInfinitivRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
UpperCaseNgramRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
MissingCommaRelativeClauseRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
AgreementRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
WiederVsWiderRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
GermanSpellerRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
OldSpellingRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
ProhibitedCompoundRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
MissingVerbRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
CaseRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
DashRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
SubjectVerbAgreementRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
AgreementRule2.match(AnalyzedSentence sentence) |
RuleMatch[] |
RedundantModalOrAuxiliaryVerb.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
SimilarNameRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
DuUpperLowerCaseRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
StyleRepeatedVeryShortSentences.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
VerbAgreementRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
StyleRepeatedSentenceBeginning.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
CompoundCoherencyRule.match(List<AnalyzedSentence> sentences) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
NumeralStressRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
protected List<RuleMatch> |
AbstractEnglishSpellerRule.getRuleMatches(String word,
int startPos,
AnalyzedSentence sentence,
List<RuleMatch> ruleMatchesSoFar,
int idx,
AnalyzedTokenReadings[] tokens) |
RuleMatch[] |
AbstractEnglishSpellerRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
UpperCaseNgramRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
AvsAnRule.match(AnalyzedSentence sentence) |
protected boolean |
EnglishUnpairedBracketsRule.preventMatch(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
ConsistentApostrophesRule.match(List<AnalyzedSentence> sentences) |
Modifier and Type | Method and Description |
---|---|
boolean |
SpanishWordRepeatBeginningRule.isSentenceException(AnalyzedSentence sentence) |
RuleMatch[] |
SimpleReplaceVerbsRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
QuestionMarkRule.match(List<AnalyzedSentence> sentences) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
GrammalecteRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
QuestionWhitespaceRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
DhaNoBeirtRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
IrishSpecificCaseRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
KhmerWordRepeatRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
NgramProbabilityRule.acceptMatch(RuleMatch match,
Probability p,
AnalyzedSentence sentence)
Overwrite this method to discard matches by returning
false . |
static double |
LanguageModelUtils.get3gramProbabilityFor(Language lang,
LanguageModel lm,
int position,
AnalyzedSentence sentence,
String candidate) |
static double |
LanguageModelUtils.get4gramProbabilityFor(Language lang,
LanguageModel lm,
int position,
AnalyzedSentence sentence,
String candidate) |
RuleMatch[] |
ConfusionProbabilityRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
NgramProbabilityRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
SpaceInCompoundRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
PreferredWordRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
RuleMatch |
RegexAntiPatternFilter.acceptRuleMatch(RuleMatch match,
Map<String,String> arguments,
AnalyzedSentence sentenceObj,
Matcher patternMatcher) |
abstract RuleMatch |
RegexRuleFilter.acceptRuleMatch(RuleMatch match,
Map<String,String> arguments,
AnalyzedSentence sentenceObj,
Matcher patternMatcher)
Returns the original rule match or a modified one, or
null
if the rule match is filtered out. |
boolean |
AbstractTokenBasedRule.canBeIgnoredFor(AnalyzedSentence sentence)
A fast check whether this rule can be ignored for the given sentence
because it can never match.
|
protected void |
AbstractPatternRulePerformer.doMatch(AnalyzedSentence sentence,
AnalyzedTokenReadings[] tokens,
AbstractPatternRulePerformer.MatchConsumer consumer) |
RuleMatch[] |
PatternRuleMatcher.match(AnalyzedSentence sentence) |
RuleMatch[] |
RuleMatcher.match(AnalyzedSentence sentence) |
RuleMatch[] |
PatternRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
RegexPatternRule.match(AnalyzedSentence sentenceObj) |
RuleMatch[] |
AbstractPatternRule.match(AnalyzedSentence sentence) |
abstract List<Rule> |
RuleSet.rulesForSentence(AnalyzedSentence sentence) |
RuleMatch |
RegexRuleFilterEvaluator.runFilter(String filterArgs,
RuleMatch ruleMatch,
AnalyzedSentence sentenceObj,
Matcher patternMatcher) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
RepeatedPatternRuleTransformer.RepeatedPatternRule.match(List<AnalyzedSentence> sentences) |
RuleMatch[] |
ConsistencyPatternRuleTransformer.ConsistencyPatternRule.match(List<AnalyzedSentence> sentences) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
BitextPatternRule.match(AnalyzedSentence sentence)
This method always returns an empty array.
|
RuleMatch[] |
BitextPatternRule.match(AnalyzedSentence sourceSentence,
AnalyzedSentence targetSentence) |
Modifier and Type | Method and Description |
---|---|
protected List<RuleMatch> |
MorfologikPolishSpellerRule.getRuleMatches(String word,
int startPos,
AnalyzedSentence sentence,
List<RuleMatch> ruleMatchesSoFar,
int idx,
AnalyzedTokenReadings[] tokens) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
PortugueseAccentuationCheckRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
RuleMatch[] |
RussianVerbConjugationRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
RussianSpecificCaseRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
protected RuleMatch |
SpellingCheckRule.createWrongSplitMatch(AnalyzedSentence sentence,
List<RuleMatch> ruleMatchesSoFar,
int pos,
String coveredWord,
String suggestion1,
String suggestion2,
int prevPos) |
abstract RuleMatch[] |
SpellingCheckRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
SymSpellRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
protected String |
HunspellRule.getSentenceTextWithoutUrlsAndImmunizedTokens(AnalyzedSentence sentence) |
protected boolean |
HunspellRule.isQuotedCompound(AnalyzedSentence analyzedSentence,
int idx,
String token)
Is the given token part of a hyphenated compound preceded by a quoted token (e.g., „Spiegel“-Magazin)
and should be treated as an ordinary hyphenated compound (e.g., „Spiegel-Magazin“)
|
RuleMatch[] |
HunspellRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
protected List<RuleMatch> |
MorfologikSpellerRule.getRuleMatches(String word,
int startPos,
AnalyzedSentence sentence,
List<RuleMatch> ruleMatchesSoFar,
int idx,
AnalyzedTokenReadings[] tokens) |
RuleMatch[] |
MorfologikSpellerRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
org.apache.commons.lang3.tuple.Pair<List<SuggestedReplacement>,SortedMap<String,Float>> |
SuggestionsOrdererFeatureExtractor.computeFeatures(List<String> suggestions,
String word,
AnalyzedSentence sentence,
int startPos)
compute features for training or prediction of a ranking model for suggestions
|
List<SuggestedReplacement> |
SuggestionsOrdererFeatureExtractor.orderSuggestions(List<String> suggestions,
String word,
AnalyzedSentence sentence,
int startPos) |
List<SuggestedReplacement> |
SuggestionsOrderer.orderSuggestions(List<String> suggestions,
String word,
AnalyzedSentence sentence,
int startPos) |
default List<String> |
SuggestionsOrderer.orderSuggestionsUsingModel(List<String> suggestions,
String word,
AnalyzedSentence sentence,
int startPos) |
Modifier and Type | Method and Description |
---|---|
protected RuleMatch |
UkrainianWordRepeatRule.createRuleMatch(String prevToken,
String token,
int prevPos,
int pos,
String msg,
AnalyzedSentence sentence) |
protected List<RuleMatch> |
SimpleReplaceRule.findMatches(AnalyzedTokenReadings tokenReadings,
AnalyzedSentence sentence) |
RuleMatch[] |
MissingHyphenRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
SimpleReplaceSpelling2019Rule.match(AnalyzedSentence sentence) |
RuleMatch[] |
SimpleReplaceSpelling1992Rule.match(AnalyzedSentence sentence) |
RuleMatch[] |
TokenAgreementPrepNounRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
TypographyRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
MixedAlphabetsRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
SimpleReplaceRenamedRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
TokenAgreementNumrNounRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
HiddenCharacterRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
TokenAgreementVerbNounRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
TokenAgreementAdjNounRule.match(AnalyzedSentence sentence) |
RuleMatch[] |
TokenAgreementNounVerbRule.match(AnalyzedSentence sentence) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
ArabicHybridDisambiguator.disambiguate(AnalyzedSentence input) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
ArabicHybridDisambiguator.disambiguate(AnalyzedSentence input) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
Disambiguator.disambiguate(AnalyzedSentence input)
If possible, filters out the wrong POS tags.
|
AnalyzedSentence |
MultiWordChunker.disambiguate(AnalyzedSentence input) |
AnalyzedSentence |
MultiWordChunker2.disambiguate(AnalyzedSentence input)
Implements multiword POS tags, e.g., <ELLIPSIS> for ellipsis (...)
|
default AnalyzedSentence |
Disambiguator.disambiguate(AnalyzedSentence input,
JLanguageTool.CheckCancelledCallback checkCanceled)
The same as
Disambiguator.disambiguate(AnalyzedSentence) ,
but may call checkCanceled (if it's non-null) to allow for better interruptibility. |
AnalyzedSentence |
MultiWordChunker.disambiguate(AnalyzedSentence input,
JLanguageTool.CheckCancelledCallback checkCanceled)
Implements multiword POS tags, e.g., <ELLIPSIS> for ellipsis (...)
|
AnalyzedSentence |
AbstractDisambiguator.preDisambiguate(AnalyzedSentence input) |
AnalyzedSentence |
Disambiguator.preDisambiguate(AnalyzedSentence input)
If possible, filters out the wrong POS tags.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
Disambiguator.disambiguate(AnalyzedSentence input)
If possible, filters out the wrong POS tags.
|
AnalyzedSentence |
MultiWordChunker.disambiguate(AnalyzedSentence input) |
AnalyzedSentence |
MultiWordChunker2.disambiguate(AnalyzedSentence input)
Implements multiword POS tags, e.g., <ELLIPSIS> for ellipsis (...)
|
default AnalyzedSentence |
Disambiguator.disambiguate(AnalyzedSentence input,
JLanguageTool.CheckCancelledCallback checkCanceled)
The same as
Disambiguator.disambiguate(AnalyzedSentence) ,
but may call checkCanceled (if it's non-null) to allow for better interruptibility. |
AnalyzedSentence |
MultiWordChunker.disambiguate(AnalyzedSentence input,
JLanguageTool.CheckCancelledCallback checkCanceled)
Implements multiword POS tags, e.g., <ELLIPSIS> for ellipsis (...)
|
AnalyzedSentence |
AbstractDisambiguator.preDisambiguate(AnalyzedSentence input) |
AnalyzedSentence |
Disambiguator.preDisambiguate(AnalyzedSentence input)
If possible, filters out the wrong POS tags.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
CatalanHybridDisambiguator.disambiguate(AnalyzedSentence input) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
CatalanHybridDisambiguator.disambiguate(AnalyzedSentence input) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
SpanishHybridDisambiguator.disambiguate(AnalyzedSentence input) |
AnalyzedSentence |
SpanishHybridDisambiguator.disambiguate(AnalyzedSentence input,
JLanguageTool.CheckCancelledCallback checkCanceled)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
SpanishHybridDisambiguator.disambiguate(AnalyzedSentence input) |
AnalyzedSentence |
SpanishHybridDisambiguator.disambiguate(AnalyzedSentence input,
JLanguageTool.CheckCancelledCallback checkCanceled)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
FrenchHybridDisambiguator.disambiguate(AnalyzedSentence input) |
AnalyzedSentence |
FrenchHybridDisambiguator.disambiguate(AnalyzedSentence input,
JLanguageTool.CheckCancelledCallback checkCanceled)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
FrenchHybridDisambiguator.disambiguate(AnalyzedSentence input) |
AnalyzedSentence |
FrenchHybridDisambiguator.disambiguate(AnalyzedSentence input,
JLanguageTool.CheckCancelledCallback checkCanceled)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
IrishHybridDisambiguator.disambiguate(AnalyzedSentence input)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
IrishHybridDisambiguator.disambiguate(AnalyzedSentence input)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
GalicianHybridDisambiguator.disambiguate(AnalyzedSentence input)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
GalicianHybridDisambiguator.disambiguate(AnalyzedSentence input)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
PolishHybridDisambiguator.disambiguate(AnalyzedSentence input)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
PolishHybridDisambiguator.disambiguate(AnalyzedSentence input)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
PortugueseHybridDisambiguator.disambiguate(AnalyzedSentence input)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
PortugueseHybridDisambiguator.disambiguate(AnalyzedSentence input)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
RussianHybridDisambiguator.disambiguate(AnalyzedSentence input) |
AnalyzedSentence |
RussianHybridDisambiguator.disambiguate(AnalyzedSentence input,
JLanguageTool.CheckCancelledCallback checkCanceled)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
RussianHybridDisambiguator.disambiguate(AnalyzedSentence input) |
AnalyzedSentence |
RussianHybridDisambiguator.disambiguate(AnalyzedSentence input,
JLanguageTool.CheckCancelledCallback checkCanceled)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
XmlRuleDisambiguator.disambiguate(AnalyzedSentence input) |
AnalyzedSentence |
XmlRuleDisambiguator.disambiguate(AnalyzedSentence sentence,
JLanguageTool.CheckCancelledCallback checkCanceled) |
AnalyzedSentence |
DisambiguationPatternRule.replace(AnalyzedSentence sentence)
Performs disambiguation on the source sentence.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
XmlRuleDisambiguator.disambiguate(AnalyzedSentence input) |
AnalyzedSentence |
XmlRuleDisambiguator.disambiguate(AnalyzedSentence sentence,
JLanguageTool.CheckCancelledCallback checkCanceled) |
AnalyzedSentence |
DisambiguationPatternRule.replace(AnalyzedSentence sentence)
Performs disambiguation on the source sentence.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
GermanRuleDisambiguator.disambiguate(AnalyzedSentence input) |
AnalyzedSentence |
GermanRuleDisambiguator.disambiguate(AnalyzedSentence input,
JLanguageTool.CheckCancelledCallback checkCanceled) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
GermanRuleDisambiguator.disambiguate(AnalyzedSentence input) |
AnalyzedSentence |
GermanRuleDisambiguator.disambiguate(AnalyzedSentence input,
JLanguageTool.CheckCancelledCallback checkCanceled) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
ItalianRuleDisambiguator.disambiguate(AnalyzedSentence input) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
ItalianRuleDisambiguator.disambiguate(AnalyzedSentence input) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
SwedishHybridDisambiguator.disambiguate(AnalyzedSentence input)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
SwedishHybridDisambiguator.disambiguate(AnalyzedSentence input)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
UkrainianHybridDisambiguator.disambiguate(AnalyzedSentence input)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based disambiguator.
|
AnalyzedSentence |
UkrainianHybridDisambiguator.preDisambiguate(AnalyzedSentence input) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
UkrainianHybridDisambiguator.disambiguate(AnalyzedSentence input)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based disambiguator.
|
AnalyzedSentence |
UkrainianHybridDisambiguator.preDisambiguate(AnalyzedSentence input) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
DemoDisambiguator.disambiguate(AnalyzedSentence input) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
DemoDisambiguator.disambiguate(AnalyzedSentence input) |
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
EnglishHybridDisambiguator.disambiguate(AnalyzedSentence input) |
AnalyzedSentence |
EnglishHybridDisambiguator.disambiguate(AnalyzedSentence input,
JLanguageTool.CheckCancelledCallback checkCanceled)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
AnalyzedSentence |
EnglishHybridDisambiguator.disambiguate(AnalyzedSentence input) |
AnalyzedSentence |
EnglishHybridDisambiguator.disambiguate(AnalyzedSentence input,
JLanguageTool.CheckCancelledCallback checkCanceled)
Calls two disambiguator classes: (1) a chunker; (2) a rule-based
disambiguator.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
Tools.isParagraphEnd(List<AnalyzedSentence> sentences,
int nTest,
Language lang) |