pub struct LanguageServiceClient<T> { /* private fields */ }
Expand description
Provides text analysis operations such as sentiment analysis and entity recognition.
Implementations§
Source§impl<T> LanguageServiceClient<T>where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
impl<T> LanguageServiceClient<T>where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_interceptor(inner: T, interceptor: impl Into<Interceptor>) -> Self
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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§
Source§impl<T: Clone> Clone for LanguageServiceClient<T>
impl<T: Clone> Clone for LanguageServiceClient<T>
Auto Trait Implementations§
impl<T> Freeze for LanguageServiceClient<T>where
T: Freeze,
impl<T> !RefUnwindSafe for LanguageServiceClient<T>
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>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request