Struct google_language1_beta1::api::DocumentMethods
source · pub struct DocumentMethods<'a, S>where
S: 'a,{ /* private fields */ }
Expand description
A builder providing access to all methods supported on document resources.
It is not used directly, but through the CloudNaturalLanguage
hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_language1_beta1 as language1_beta1;
use std::default::Default;
use language1_beta1::{CloudNaturalLanguage, oauth2, hyper, hyper_rustls, chrono, FieldMask};
let secret: oauth2::ApplicationSecret = Default::default();
let auth = oauth2::InstalledFlowAuthenticator::builder(
secret,
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let mut hub = CloudNaturalLanguage::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `analyze_entities(...)`, `analyze_sentiment(...)`, `analyze_syntax(...)` and `annotate_text(...)`
// to build up your call.
let rb = hub.documents();
Implementations§
source§impl<'a, S> DocumentMethods<'a, S>
impl<'a, S> DocumentMethods<'a, S>
sourcepub fn analyze_entities(
&self,
request: AnalyzeEntitiesRequest
) -> DocumentAnalyzeEntityCall<'a, S>
pub fn analyze_entities( &self, request: AnalyzeEntitiesRequest ) -> DocumentAnalyzeEntityCall<'a, S>
Create a builder to help you perform the following task:
Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties.
§Arguments
request
- No description provided.
sourcepub fn analyze_sentiment(
&self,
request: AnalyzeSentimentRequest
) -> DocumentAnalyzeSentimentCall<'a, S>
pub fn analyze_sentiment( &self, request: AnalyzeSentimentRequest ) -> DocumentAnalyzeSentimentCall<'a, S>
Create a builder to help you perform the following task:
Analyzes the sentiment of the provided text.
§Arguments
request
- No description provided.
sourcepub fn analyze_syntax(
&self,
request: AnalyzeSyntaxRequest
) -> DocumentAnalyzeSyntaxCall<'a, S>
pub fn analyze_syntax( &self, request: AnalyzeSyntaxRequest ) -> DocumentAnalyzeSyntaxCall<'a, S>
Create a builder to help you perform the following task:
Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties.
§Arguments
request
- No description provided.
sourcepub fn annotate_text(
&self,
request: AnnotateTextRequest
) -> DocumentAnnotateTextCall<'a, S>
pub fn annotate_text( &self, request: AnnotateTextRequest ) -> DocumentAnnotateTextCall<'a, S>
Create a builder to help you perform the following task:
A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call.
§Arguments
request
- No description provided.