Package org.languagetool.rules
Class GRPCPostProcessing
java.lang.Object
org.languagetool.rules.GRPCPostProcessing
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate io.grpc.ManagedChannelprivate final io.github.resilience4j.circuitbreaker.CircuitBreakerprivate RemoteRuleConfigstatic final Stringprivate static ConcurrentMap<Language, Set<String>> private static ConcurrentMap<String, GRPCPostProcessing> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildRequest(List<AnalyzedSentence> sentences, List<RuleMatch> ruleMatches, List<Integer> offset, Long textSessionId, boolean inputLogging) static voidconfigure(Language lang, List<RemoteRuleConfig> configs) filter(List<AnalyzedSentence> sentences, List<RuleMatch> ruleMatches, Long textSessionID, boolean inputLogging) static List<GRPCPostProcessing> runPostprocessing(List<AnalyzedSentence> sentences, List<RuleMatch> ruleMatches, Long textSessionID, boolean inputLogging, int chars) protected MLServerProto.MatchResponsesendRequest(MLServerProto.PostProcessingRequest req, long timeout)
-
Field Details
-
CONFIG_TYPE
- See Also:
-
circuitBreaker
private final io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker -
channel
private io.grpc.ManagedChannel channel -
stub
-
config
-
instances
-
configIDs
-
-
Constructor Details
-
GRPCPostProcessing
- Throws:
Exception
-
-
Method Details
-
get
-
configure
-
buildRequest
private MLServerProto.PostProcessingRequest buildRequest(List<AnalyzedSentence> sentences, List<RuleMatch> ruleMatches, List<Integer> offset, Long textSessionId, boolean inputLogging) -
filter
-
sendRequest
protected MLServerProto.MatchResponse sendRequest(MLServerProto.PostProcessingRequest req, long timeout) throws Exception - Throws:
Exception
-
runPostprocessing
protected List<RuleMatch> runPostprocessing(List<AnalyzedSentence> sentences, List<RuleMatch> ruleMatches, Long textSessionID, boolean inputLogging, int chars) throws Exception - Throws:
Exception
-