Struct googapis::google::cloud::language::v1::language_service_client::LanguageServiceClient [−][src]
pub struct LanguageServiceClient<T> { /* fields omitted */ }
Expand description
Provides text analysis operations such as sentiment analysis and entity recognition.
Implementations
impl<T> LanguageServiceClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> LanguageServiceClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> LanguageServiceClient<InterceptedService<T, F>> where
F: Interceptor,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Compress requests with gzip
.
This requires the server to support it otherwise it might respond with an error.
Enable decompressing responses with gzip
.
pub async fn analyze_sentiment(
&mut self,
request: impl IntoRequest<AnalyzeSentimentRequest>
) -> Result<Response<AnalyzeSentimentResponse>, Status>
pub async fn analyze_sentiment(
&mut self,
request: impl IntoRequest<AnalyzeSentimentRequest>
) -> Result<Response<AnalyzeSentimentResponse>, Status>
Analyzes the sentiment of the provided text.
pub async fn analyze_entities(
&mut self,
request: impl IntoRequest<AnalyzeEntitiesRequest>
) -> Result<Response<AnalyzeEntitiesResponse>, Status>
pub async fn analyze_entities(
&mut self,
request: impl IntoRequest<AnalyzeEntitiesRequest>
) -> Result<Response<AnalyzeEntitiesResponse>, Status>
Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties.
pub async fn analyze_entity_sentiment(
&mut self,
request: impl IntoRequest<AnalyzeEntitySentimentRequest>
) -> Result<Response<AnalyzeEntitySentimentResponse>, Status>
pub async fn analyze_entity_sentiment(
&mut self,
request: impl IntoRequest<AnalyzeEntitySentimentRequest>
) -> Result<Response<AnalyzeEntitySentimentResponse>, Status>
Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes sentiment associated with each entity and its mentions.
pub async fn analyze_syntax(
&mut self,
request: impl IntoRequest<AnalyzeSyntaxRequest>
) -> Result<Response<AnalyzeSyntaxResponse>, Status>
pub async fn analyze_syntax(
&mut self,
request: impl IntoRequest<AnalyzeSyntaxRequest>
) -> Result<Response<AnalyzeSyntaxResponse>, Status>
Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties.
pub async fn classify_text(
&mut self,
request: impl IntoRequest<ClassifyTextRequest>
) -> Result<Response<ClassifyTextResponse>, Status>
pub async fn classify_text(
&mut self,
request: impl IntoRequest<ClassifyTextRequest>
) -> Result<Response<ClassifyTextResponse>, Status>
Classifies a document into categories.
pub async fn annotate_text(
&mut self,
request: impl IntoRequest<AnnotateTextRequest>
) -> Result<Response<AnnotateTextResponse>, Status>
pub async fn annotate_text(
&mut self,
request: impl IntoRequest<AnnotateTextRequest>
) -> Result<Response<AnnotateTextResponse>, Status>
A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for LanguageServiceClient<T> where
T: RefUnwindSafe,
impl<T> Send for LanguageServiceClient<T> where
T: Send,
impl<T> Sync for LanguageServiceClient<T> where
T: Sync,
impl<T> Unpin for LanguageServiceClient<T> where
T: Unpin,
impl<T> UnwindSafe for LanguageServiceClient<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more