Class GrammalecteRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.fr.GrammalecteRule
@Experimental
public class GrammalecteRule
extends org.languagetool.rules.Rule
Queries a local Grammalecte server.
- Since:
- 4.6
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longprivate final org.languagetool.GlobalConfigprivate static longprivate static org.slf4j.Loggerprivate final com.fasterxml.jackson.databind.ObjectMapperprivate static final intFields inherited from class org.languagetool.rules.Rule
messages -
Constructor Summary
ConstructorsConstructorDescriptionGrammalecteRule(ResourceBundle messages, org.languagetool.GlobalConfig globalConfig) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetId()private @NotNull List<org.languagetool.rules.RuleMatch> getMatches(Map<String, Object> match) org.languagetool.rules.RuleMatch[]match(org.languagetool.AnalyzedSentence sentence) private @NotNull List<org.languagetool.rules.RuleMatch> parseJson(InputStream inputStream) Methods inherited from class org.languagetool.rules.Rule
addExamplePair, estimateContextForSureMatch, getAntiPatterns, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getErrorTriggeringExamples, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getSentenceWithImmunization, getUrl, hasConfigurableValue, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isOfficeDefaultOff, isOfficeDefaultOn, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setErrorTriggeringExamples, setIncorrectExamples, setLocQualityIssueType, setOfficeDefaultOff, setOfficeDefaultOn, setUrl, supportsLanguage, toRuleMatchArray, useInOffice
-
Field Details
-
logger
private static org.slf4j.Logger logger -
TIMEOUT_MILLIS
private static final int TIMEOUT_MILLIS- See Also:
-
DOWN_INTERVAL_MILLISECONDS
private static final long DOWN_INTERVAL_MILLISECONDS- See Also:
-
lastRequestError
private static long lastRequestError -
mapper
private final com.fasterxml.jackson.databind.ObjectMapper mapper -
globalConfig
private final org.languagetool.GlobalConfig globalConfig -
ignoreRules
-
-
Constructor Details
-
GrammalecteRule
-
-
Method Details
-
getId
- Specified by:
getIdin classorg.languagetool.rules.Rule
-
getDescription
- Specified by:
getDescriptionin classorg.languagetool.rules.Rule
-
match
public org.languagetool.rules.RuleMatch[] match(org.languagetool.AnalyzedSentence sentence) throws IOException - Specified by:
matchin classorg.languagetool.rules.Rule- Throws:
IOException
-
parseJson
@NotNull private @NotNull List<org.languagetool.rules.RuleMatch> parseJson(InputStream inputStream) throws IOException - Throws:
IOException
-
encode
- Throws:
UnsupportedEncodingException
-
getMatches
-