google_api_language v0.7.0 GoogleApi.Language.V1.Api.Documents View Source

API calls for all endpoints tagged Documents.

Link to this section Summary

Functions

Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties.

Finds entities, similar to AnalyzeEntities in the text and analyzes sentiment associated with each entity and its mentions.

Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties.

A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call.

Link to this section Functions

Link to this function

language_documents_analyze_entities(connection, optional_params \\ [], opts \\ [])

View Source
language_documents_analyze_entities(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Language.V1.Model.AnalyzeEntitiesResponse.t()}
  | {:error, Tesla.Env.t()}

Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties.

Parameters

  • connection (type: GoogleApi.Language.V1.Connection.t) - Connection to server
  • optional_params (type: keyword()) - Optional parameters

    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :body (type: GoogleApi.Language.V1.Model.AnalyzeEntitiesRequest.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Language.V1.Model.AnalyzeEntitiesResponse{}} on success
  • {:error, info} on failure
Link to this function

language_documents_analyze_entity_sentiment(connection, optional_params \\ [], opts \\ [])

View Source
language_documents_analyze_entity_sentiment(
  Tesla.Env.client(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Language.V1.Model.AnalyzeEntitySentimentResponse.t()}
  | {:error, Tesla.Env.t()}

Finds entities, similar to AnalyzeEntities in the text and analyzes sentiment associated with each entity and its mentions.

Parameters

  • connection (type: GoogleApi.Language.V1.Connection.t) - Connection to server
  • optional_params (type: keyword()) - Optional parameters

    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :body (type: GoogleApi.Language.V1.Model.AnalyzeEntitySentimentRequest.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Language.V1.Model.AnalyzeEntitySentimentResponse{}} on success
  • {:error, info} on failure
Link to this function

language_documents_analyze_sentiment(connection, optional_params \\ [], opts \\ [])

View Source
language_documents_analyze_sentiment(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Language.V1.Model.AnalyzeSentimentResponse.t()}
  | {:error, Tesla.Env.t()}

Analyzes the sentiment of the provided text.

Parameters

  • connection (type: GoogleApi.Language.V1.Connection.t) - Connection to server
  • optional_params (type: keyword()) - Optional parameters

    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :body (type: GoogleApi.Language.V1.Model.AnalyzeSentimentRequest.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Language.V1.Model.AnalyzeSentimentResponse{}} on success
  • {:error, info} on failure
Link to this function

language_documents_analyze_syntax(connection, optional_params \\ [], opts \\ [])

View Source
language_documents_analyze_syntax(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Language.V1.Model.AnalyzeSyntaxResponse.t()}
  | {:error, Tesla.Env.t()}

Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties.

Parameters

  • connection (type: GoogleApi.Language.V1.Connection.t) - Connection to server
  • optional_params (type: keyword()) - Optional parameters

    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :body (type: GoogleApi.Language.V1.Model.AnalyzeSyntaxRequest.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Language.V1.Model.AnalyzeSyntaxResponse{}} on success
  • {:error, info} on failure
Link to this function

language_documents_annotate_text(connection, optional_params \\ [], opts \\ [])

View Source
language_documents_annotate_text(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Language.V1.Model.AnnotateTextResponse.t()}
  | {:error, Tesla.Env.t()}

A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call.

Parameters

  • connection (type: GoogleApi.Language.V1.Connection.t) - Connection to server
  • optional_params (type: keyword()) - Optional parameters

    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :body (type: GoogleApi.Language.V1.Model.AnnotateTextRequest.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Language.V1.Model.AnnotateTextResponse{}} on success
  • {:error, info} on failure
Link to this function

language_documents_classify_text(connection, optional_params \\ [], opts \\ [])

View Source
language_documents_classify_text(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Language.V1.Model.ClassifyTextResponse.t()}
  | {:error, Tesla.Env.t()}

Classifies a document into categories.

Parameters

  • connection (type: GoogleApi.Language.V1.Connection.t) - Connection to server
  • optional_params (type: keyword()) - Optional parameters

    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :body (type: GoogleApi.Language.V1.Model.ClassifyTextRequest.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Language.V1.Model.ClassifyTextResponse{}} on success
  • {:error, info} on failure