Natural Language V1 API - Class Google::Cloud::Language::V1::LanguageService::Rest::ServiceStub (v0.9.0)

Reference documentation and code samples for the Natural Language V1 API class Google::Cloud::Language::V1::LanguageService::Rest::ServiceStub.

REST service stub for the LanguageService service. Service stub contains baseline method implementations including transcoding, making the REST call, and deserialing the response.

Inherits

  • Object

Methods

#analyze_entities

def analyze_entities(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Language::V1::AnalyzeEntitiesResponse

Baseline implementation for the analyze_entities REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#analyze_entity_sentiment

def analyze_entity_sentiment(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Language::V1::AnalyzeEntitySentimentResponse

Baseline implementation for the analyze_entity_sentiment REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#analyze_sentiment

def analyze_sentiment(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Language::V1::AnalyzeSentimentResponse

Baseline implementation for the analyze_sentiment REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#analyze_syntax

def analyze_syntax(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Language::V1::AnalyzeSyntaxResponse

Baseline implementation for the analyze_syntax REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#annotate_text

def annotate_text(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Language::V1::AnnotateTextResponse

Baseline implementation for the annotate_text REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#classify_text

def classify_text(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Language::V1::ClassifyTextResponse

Baseline implementation for the classify_text REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)

#initialize

def initialize(endpoint:, credentials:) -> ServiceStub
Returns

#moderate_text

def moderate_text(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Language::V1::ModerateTextResponse

Baseline implementation for the moderate_text REST call

Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::ArgumentError)