View Source GoogleApi.Language.V2.Api.Documents (google_api_language v0.15.0)

API calls for all endpoints tagged Documents.

Summary

Functions

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

A convenience method that provides all features in one call.

Moderates a document for harmful and sensitive categories.

Functions

Link to this function

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

View Source
@spec language_documents_analyze_entities(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Language.V2.Model.AnalyzeEntitiesResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

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

Parameters

  • connection (type: GoogleApi.Language.V2.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.V2.Model.AnalyzeEntitiesRequest.t) -
  • opts (type: keyword()) - Call options

Returns

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

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

View Source
@spec language_documents_analyze_sentiment(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Language.V2.Model.AnalyzeSentimentResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Analyzes the sentiment of the provided text.

Parameters

  • connection (type: GoogleApi.Language.V2.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.V2.Model.AnalyzeSentimentRequest.t) -
  • opts (type: keyword()) - Call options

Returns

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

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

View Source
@spec language_documents_annotate_text(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Language.V2.Model.AnnotateTextResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

A convenience method that provides all features in one call.

Parameters

  • connection (type: GoogleApi.Language.V2.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.V2.Model.AnnotateTextRequest.t) -
  • opts (type: keyword()) - Call options

Returns

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

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

View Source
@spec language_documents_classify_text(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Language.V2.Model.ClassifyTextResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Classifies a document into categories.

Parameters

  • connection (type: GoogleApi.Language.V2.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.V2.Model.ClassifyTextRequest.t) -
  • opts (type: keyword()) - Call options

Returns

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

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

View Source
@spec language_documents_moderate_text(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Language.V2.Model.ModerateTextResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Moderates a document for harmful and sensitive categories.

Parameters

  • connection (type: GoogleApi.Language.V2.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.V2.Model.ModerateTextRequest.t) -
  • opts (type: keyword()) - Call options

Returns

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