Questions tagged [google-cloud-language]

14 questions
4
votes
2 answers

how to convert google cloud natural language entity sentiment response to JSON/dict in Python?

I am trying to use google cloud natural language API for analyzing entity sentiments. from google.cloud import language_v1 import os os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'path/to/json' client =…
Regressor
  • 1,843
  • 4
  • 27
  • 67
2
votes
0 answers

Is there a conflict between google-cloud-language, pandas, and conda?

In order to feed text strings stored in a .csv file into Google's named entity extractor, I would like to use the Google NLP API and pandas together. I am currently using conda to manage my python environments. These are the steps I have taken:…
2
votes
1 answer

cant access GCS object correctly from cloud functions

Any time I try to get the cloud storage bucket object and input using a method shown on the support sites I get the error google.api_core.exceptions.InvalidArgument: 400 The GCS object specified in gcs_content_uri does not exist. The gcs…
1
vote
1 answer

How to resolve - ValueError: cannot set using a multi-index selection indexer with a different length than the value in Python

I have some sample code that I use to analyze entities and its sentiments using Google's natural language API. For every record in my Pandas dataframe, I want to return a list of dictionaries where each element is an entity. However, I am running…
Regressor
  • 1,843
  • 4
  • 27
  • 67
1
vote
1 answer

Google Cloud Natural Language Import Error

I am having a lot of trouble with getting the Google Cloud Natural Language API running. I am trying to run a Python program in Linux on a Google VM. I am also unsure of how to run a full Traceback of the error. The following code is not…
1
vote
0 answers

No handlers could be found for logger "grpc._plugin_wrapping"

I am getting the following error: No handlers could be found for logger "grpc._plugin_wrapping" (full error text) Similar to https://github.com/googlecodelabs/iot-data-pipeline/issues/6 We are using python2.7 and google-cloud,…
David
  • 3,166
  • 2
  • 30
  • 51
0
votes
1 answer

Google Cloud Language in Google Colab fails since yesterday

I have problems since yesterday running Google Cloud NLP entity analysis in Google Colab. I'm using almost exactly this code https://cloud.google.com/natural-language/docs/sentiment-analysis-client-libraries?hl=en#analyze_some_text I get either the…
Tobi
  • 1,702
  • 2
  • 23
  • 42
0
votes
1 answer

How to use google cloud natural language api using python?

When I run code for google cloud natural language using python on local system , code is execute successfully , but When I run the same code on some network restrictions(may be office network), it show me error. I already created google service…
Amit Saini
  • 136
  • 2
  • 16
0
votes
1 answer

module 'google.cloud.language_v1' has no attribute 'EncodingType'

I am learning google natural language API by following a sample python code, and running the same in google colab, however, I am getting below error.. # Create the document document = { "type_": "PLAIN_TEXT", "language": "en", …
0
votes
2 answers

ImportError cannot import 'langauge' from 'google.cloud' (unknown location)

I'm trying to incorporate google-cloud-language to use sentiment analysis. I followed the guide on the google documentation website, like so: from google.cloud import language When I run the script I receive the following error: ImportError cannot…
0
votes
2 answers

Compatibility issue with google-cloud-language in Cloud composer

I'm using the python3 API google-cloud-language 1.3.0 in composer-1.8.3-airflow-1.10.3. It used to be well but from last two weeks it reported ImportError: cannot import name 'aio' from 'grpc.experimental' I've checked the doc of package, it looks…
0
votes
1 answer

Google Cloud API output format in Python

If I call the function analyse_syntax from Google Cloud Python library, it returns document = types.Document(content='Tried this', type=enums.Document.Type.PLAIN_TEXT) info = client.analyze_syntax(document=document) print(info) sentences { text…
Raphael
  • 1,518
  • 2
  • 14
  • 27
0
votes
1 answer

ImportError: No module named grpc._cython.cygrpc in AppEngine standard local

Hi I get the following error: grpc/init.py", line 22, in from grpc._cython import cygrpc as _cygrpc File "~/bin/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/runtime/sandbox.py", line 1095, in…
battery
  • 502
  • 6
  • 26
0
votes
1 answer

Adding Google Language API results in DuplicateRelativeFileException

In an android studio project I added implementation 'com.google.cloud:google-cloud-language:1.40.0' to the app's gradle file. This results in the following error on building: org.gradle.api.tasks.TaskExecutionException: Execution failed for task…