Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Com a Cloud Natural Language, você tem algum controle sobre onde os recursos do seu projeto são processados. Em especial, é possível configurar a Cloud Natural Language para
realizar o processamento de machine learning nos seus dados somente na UE ou nos EUA.
Por padrão, a Cloud Natural Language processa recursos em um local global, o que significa que a Cloud Natural Language não garante que seus recursos permanecerão em um determinado local ou região. Se você escolher a União Europeia como local, o Google vai realizar o machine learning com eles somente na UE. Se você escolher o local Estados Unidos, o Google vai realizar o machine learning com eles somente nos EUA. Você e seus usuários
podem acessar os dados de qualquer local.
Como definir o local usando a API
A API Cloud Natural Language é compatível com um endpoint global da API (language.googleapis.com),
um endpoint da União Europeia (eu-language.googleapis.com) e um endpoint dos Estados Unidos (us-language.googleapis.com).
Para processar seus dados apenas na União Europeia, use o URI
eu-language.googleapis.com no lugar de language.googleapis.com para suas chamadas da API REST.
Para processar seus dados somente nos Estados Unidos, use o URI
us-language.googleapis.com no lugar de language.googleapis.com para suas chamadas da API REST.
A API Text Moderation também está disponível na Austrália. Para acessá-la, use o URI au-language.googleapis.com em vez de language.googleapis.com nas chamadas da API REST.
Como definir o local usando bibliotecas de cliente
As bibliotecas de cliente acessam o endpoint da API global (language.googleapis.com) por padrão. Para armazenar e processar seus dados apenas na União Europeia ou nos Estados Unidos, defina explicitamente o endpoint. Os exemplo de código abaixo mostram como definir essa configuração.
# Imports the Google Cloud client libraryfromgoogle.cloudimportlanguage_v1client_options={"api_endpoint":"eu-language.googleapis.com:443"}# Instantiates a client.client=language_v1.LanguageServiceClient(client_options=client_options)
LanguageServiceSettingssettings=LanguageServiceSettings.newBuilder().setEndpoint("eu-language.googleapis.com:443").build();// Initialize client that will be used to send requests. This client only needs to be created// once, and can be reused for multiple requests. After completing all of your requests, call// the "close" method on the client to safely clean up any remaining background resources.LanguageServiceClientclient=LanguageServiceClient.create(settings);
// Imports the Google Cloud client libraryconstlanguage=require('@google-cloud/language');// Specifies the location of the api endpointconstclientOptions={apiEndpoint:'eu-language.googleapis.com'};// Instantiates a clientconstclient=newlanguage.LanguageServiceClient(clientOptions);
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-11 UTC."],[],[],null,["# Locations\n\nCloud Natural Language offers you some control over where the resources for your\nproject are processed. In particular, you can configure Cloud Natural Language to\nperform machine learning processing on your data only in the EU or the US.\n\nBy default Cloud Natural Language processes resources in a **Global** location,\nwhich means that Cloud Natural Language doesn't guarantee that your resources will\nremain within a particular location or region. If you choose the\n**European Union** location, Google will perform machine learning with it only\nin the EU. If you choose the **United States** location, Google will\nperform machine learning with it only in the US. You and your users\ncan access the data from any location.\n\nSetting the location using the API\n----------------------------------\n\nCloud Natural Language supports a global API endpoint (`language.googleapis.com`),\na European Union endpoint (`eu-language.googleapis.com`), and a United States\nendpoint (`us-language.googleapis.com`).\nTo process your data in the European Union only, use the URI\n`eu-language.googleapis.com` in place of `language.googleapis.com` for your REST API calls.\nTo process your data in the United States only, use the URI\n`us-language.googleapis.com` in place of `language.googleapis.com` for your REST API calls.\n\nThe text moderation API is also available in Australia, which can be accessed by using the URI `au-language.googleapis.com` in place of `language.googleapis.com` for your REST API calls.\n\nSetting the location using client libraries\n-------------------------------------------\n\nThe client libraries access the global API endpoint (`language.googleapis.com`)\nby default. To store and process your data in the European Union or United States only, you need to\nexplicitly set the endpoint. The code samples below show how to configure this setting. \n\n### Python\n\n\nTo learn how to install and use the client library for Natural Language, see\n[Natural Language client libraries](/natural-language/docs/reference/libraries).\n\n\nFor more information, see the\n[Natural Language Python API\nreference documentation](/python/docs/reference/language/latest).\n\n\nTo authenticate to Natural Language, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n # Imports the Google Cloud client library\n from google.cloud import language_v1\n\n client_options = {\"api_endpoint\": \"eu-language.googleapis.com:443\"}\n\n # Instantiates a client.\n client = language_v1.LanguageServiceClient(client_options=client_options)\n\n### Java\n\n\nTo learn how to install and use the client library for Natural Language, see\n[Natural Language client libraries](/natural-language/docs/reference/libraries).\n\n\nFor more information, see the\n[Natural Language Java API\nreference documentation](/java/docs/reference/google-cloud-language/latest/overview).\n\n\nTo authenticate to Natural Language, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n LanguageServiceSettings settings =\n LanguageServiceSettings.newBuilder().setEndpoint(\"eu-language.googleapis.com:443\").build();\n\n // Initialize client that will be used to send requests. This client only needs to be created\n // once, and can be reused for multiple requests. After completing all of your requests, call\n // the \"close\" method on the client to safely clean up any remaining background resources.\n LanguageServiceClient client = LanguageServiceClient.create(settings);\n\n### Node.js\n\n\nTo learn how to install and use the client library for Natural Language, see\n[Natural Language client libraries](/natural-language/docs/reference/libraries).\n\n\nFor more information, see the\n[Natural Language Node.js API\nreference documentation](/nodejs/docs/reference/language/latest).\n\n\nTo authenticate to Natural Language, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n // Imports the Google Cloud client library\n const language = require('https://cloud.google.com/nodejs/docs/reference/language/latest/overview.html');\n\n // Specifies the location of the api endpoint\n const clientOptions = {apiEndpoint: 'eu-language.googleapis.com'};\n\n // Instantiates a client\n const client = new language.https://cloud.google.com/nodejs/docs/reference/language/latest/overview.html(clientOptions);\n\n\u003cbr /\u003e"]]