Class RemoteLanguageModel
java.lang.Object
org.languagetool.languagemodel.bert.RemoteLanguageModel
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.common.cache.Cache<RemoteLanguageModel.Request, List<Double>> private final io.grpc.ManagedChannelprivate final BertLmGrpc.BertLmBlockingStub -
Constructor Summary
ConstructorsConstructorDescriptionRemoteLanguageModel(String host, int port, boolean useSSL, String clientPrivateKey, String clientCertificate, String rootCertificate) -
Method Summary
Modifier and TypeMethodDescriptionbatchScore(List<RemoteLanguageModel.Request> requests, long timeoutMilliseconds) private io.grpc.ManagedChannelgetChannel(String host, int port, boolean useSSL, String clientPrivateKey, String clientCertificate, String rootCertificate) voidshutdown()
-
Field Details
-
model
-
channel
private final io.grpc.ManagedChannel channel -
cache
-
-
Constructor Details
-
RemoteLanguageModel
public RemoteLanguageModel(String host, int port, boolean useSSL, @Nullable String clientPrivateKey, @Nullable String clientCertificate, @Nullable String rootCertificate) throws SSLException - Throws:
SSLException
-
-
Method Details
-
getChannel
private io.grpc.ManagedChannel getChannel(String host, int port, boolean useSSL, @Nullable String clientPrivateKey, @Nullable String clientCertificate, @Nullable String rootCertificate) throws SSLException - Throws:
SSLException
-
shutdown
public void shutdown() -
batchScore
public List<List<Double>> batchScore(List<RemoteLanguageModel.Request> requests, long timeoutMilliseconds) throws TimeoutException - Throws:
TimeoutException
-
score
-