Class NlpServiceGrpc.NlpServiceStub

java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractAsyncStub<NlpServiceGrpc.NlpServiceStub>
de.uni_trier.recap.arg_services.nlp.v1.NlpServiceGrpc.NlpServiceStub
Enclosing class:
NlpServiceGrpc

public static final class NlpServiceGrpc.NlpServiceStub extends io.grpc.stub.AbstractAsyncStub<NlpServiceGrpc.NlpServiceStub>
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub

    io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>>
  • Method Summary

    Modifier and Type
    Method
    Description
    build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
     
    void
    docBin(DocBinRequest request, io.grpc.stub.StreamObserver<DocBinResponse> responseObserver)
    Process strings by spacy and return them as [binary data](https://spacy.io/api/docbin).
    void
    similarities(SimilaritiesRequest request, io.grpc.stub.StreamObserver<SimilaritiesResponse> responseObserver)
    Compute the similarity score between two strings.
    void
    vectors(VectorsRequest request, io.grpc.stub.StreamObserver<VectorsResponse> responseObserver)
    Compute embeddings (i.e., vectors) for strings.

    Methods inherited from class io.grpc.stub.AbstractAsyncStub

    newStub, newStub

    Methods inherited from class io.grpc.stub.AbstractStub

    getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOption, withWaitForReady

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • build

      protected NlpServiceGrpc.NlpServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.grpc.stub.AbstractStub<NlpServiceGrpc.NlpServiceStub>
    • vectors

      public void vectors(VectorsRequest request, io.grpc.stub.StreamObserver<VectorsResponse> responseObserver)
       Compute embeddings (i.e., vectors) for strings.
       
    • similarities

      public void similarities(SimilaritiesRequest request, io.grpc.stub.StreamObserver<SimilaritiesResponse> responseObserver)
       Compute the similarity score between two strings.
       
    • docBin

      public void docBin(DocBinRequest request, io.grpc.stub.StreamObserver<DocBinResponse> responseObserver)
       Process strings by spacy and return them as [binary data](https://spacy.io/api/docbin).
       Locally, spacy can restore this data **without** loading the underlying NLP models into the main memory.
       Allows one to retrieve all computed attributes (e.g., POS tags, sentences), but can only be used by Python programs.