public class BERTSuggestionRanking extends RemoteRule
RemoteRule.RemoteRequest| Modifier and Type | Field and Description |
|---|---|
static String |
RULE_ID |
protected int |
suggestionLimit |
circuitBreakers, filterMatches, fixOffsets, inputLogging, lt, premium, ruleLanguage, serviceConfiguration, shutdownRoutines, suppressMisspelledMatch, suppressMisspelledSuggestions, whitespaceNormalisation| Constructor and Description |
|---|
BERTSuggestionRanking(Language language,
Rule rule,
RemoteRuleConfig config,
boolean inputLogging) |
| Modifier and Type | Method and Description |
|---|---|
protected Callable<RemoteRuleResult> |
executeRequest(RemoteRule.RemoteRequest request,
long timeoutMilliseconds) |
protected RemoteRuleResult |
fallbackResults(RemoteRule.RemoteRequest request)
fallback if executeRequest times out or throws an error
|
String |
getDescription()
A short description of the error this rule can detect, usually in the language of the text
that is checked.
|
String |
getId()
A string used to identify the rule in e.g. configuration files.
|
protected RemoteRule.RemoteRequest |
prepareRequest(List<AnalyzedSentence> sentences,
Long textSessionId)
run local preprocessing steps (or just store sentences)
|
protected List<SuggestedReplacement> |
prepareSuggestions(List<SuggestedReplacement> suggestions)
transform suggestions before resorting, e.g. limit resorting to top-n candidates
|
circuitBreaker, createCircuitBreaker, fixMatchOffsets, getServiceConfiguration, getTimeout, isPremium, match, run, run, shutdownaddExamplePair, addTags, addToneTags, cacheAntiPatterns, estimateContextForSureMatch, getAntiPatterns, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getDistanceTokens, getErrorTriggeringExamples, getFullId, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getMinPrevMatches, getSentenceWithImmunization, getSourceFile, getSubId, getTags, getToneTags, getUrl, hasConfigurableValue, hasTag, hasToneTag, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isGoalSpecific, isOfficeDefaultOff, isOfficeDefaultOn, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setDistanceTokens, setErrorTriggeringExamples, setExamplePair, setGoalSpecific, setIncorrectExamples, setLocQualityIssueType, setMinPrevMatches, setOfficeDefaultOff, setOfficeDefaultOn, setPremium, setTags, setToneTags, setUrl, supportsLanguage, toRuleMatchArray, useInOfficepublic static final String RULE_ID
protected int suggestionLimit
public BERTSuggestionRanking(Language language, Rule rule, RemoteRuleConfig config, boolean inputLogging)
protected List<SuggestedReplacement> prepareSuggestions(List<SuggestedReplacement> suggestions)
protected RemoteRule.RemoteRequest prepareRequest(List<AnalyzedSentence> sentences, Long textSessionId)
RemoteRuleprepareRequest in class RemoteRulesentences - text to processtextSessionId - session ID for caching, partial rollout, A/B testingprotected RemoteRuleResult fallbackResults(RemoteRule.RemoteRequest request)
RemoteRulefallbackResults in class RemoteRulerequest - returned by prepareRequestprotected Callable<RemoteRuleResult> executeRequest(RemoteRule.RemoteRequest request, long timeoutMilliseconds) throws TimeoutException
executeRequest in class RemoteRulerequest - returned by prepareRequesttimeoutMilliseconds - timeout for this operation, <=0 -> unlimitedTimeoutException - if timeout was exceededpublic String getId()
RuleA-Z
and the underscore.getId in class RemoteRulepublic String getDescription()
RulegetDescription in class Rule