Questions tagged [google-natural-language]
97 questions
1
vote
1 answer
Client error: `POST { "error": { "code": 400, "message": "One of content, or gcs_content_uri must be set.", "status": "INVALID (truncated
I try to call post api from laravel with GuzzleHttp\Client.but we try tp pass api key with different ways but not get output if i append API key in url then i get this result.
//intiate client
$client = new \GuzzleHttp\Client([
…

Trusha Paradkar
- 13
- 3
1
vote
1 answer
Getting error "INTERNAL" when training a model with AutoML
I'm training a small model with AutoML entity extraction, but the training keeps failing with the error message "INTERNAL" and no other details.
I'm doing this from the Google Cloud console, and I've followed the same steps I've used successfully to…

Tim
- 2,843
- 13
- 25
1
vote
1 answer
Request has type LocalProxy, but expected one of: bytes, unicode
I'm trying to use the Google Cloud Platform Natural Language API with Python within a Google Cloud Function. Whenever I use the code provided in this Google tutorial for analyzing entity analysis using text in Cloud Storage, I get the following…

Spencer Goff
- 1,036
- 3
- 14
- 23
1
vote
1 answer
Google Natural language api python goes to an infinite loop
I'm using google natural language api to analyse the sentiment in a sentence. But, every time I run the script. It goes to an infinite loop of sleep.
My code.
comments = "This product is really good"
credentials = GoogleAuth.get_instance()
client =…

Aakash
- 1,751
- 1
- 14
- 21
1
vote
1 answer
Java Google AutoML NLP client waiting forever for response (no exception thrown)
I trained succesfully my own NLP AutoML model yesterday. I am able to do quite accurate predictions in GCP console. Everything ran smoothly. Today I have been trying to do prediction from Java client based on this example…

Oliver Eder
- 85
- 2
- 10
1
vote
2 answers
AttributeError: 'LanguageServiceClient' object has no attribute 'classify_text'
I'm trying to classify some text and have the following code:
from google.cloud import language
from google.cloud.language import enums
from google.cloud.language import types
def classify_text(text):
"""Classifies content categories of the…

snapcrack
- 1,761
- 3
- 20
- 40
1
vote
2 answers
env variable GOOGLE_APPLICATION_CREDENTIALS last only one day on Google cloud
In Google shell which is a part of Google cloud, I set environment variable GOOGLE_APPLICATION_CREDENTIALS because It is need it for PHP NLP project [info:…

Slit
- 491
- 1
- 7
- 20
1
vote
1 answer
Demo app from Google NLP not working - "code": 403
Could some one help me with sample application from this site: https://cloud.google.com/natural-language/docs/quickstart-client-libraries#client-libraries-install-php. I did, at least I think I did, everything what is required. And I am constantly…

Slit
- 491
- 1
- 7
- 20
1
vote
1 answer
Google NLP API - Companies identified as "Unknown"
I try to identify entities in French newspaper articles and very often organizations, even famous ones such as Apple, are identified as "Unknown", whereas the linked Wikipedia page is correct.
You can try using the content of this…

Rupert Schiessl
- 799
- 6
- 11
0
votes
0 answers
Google Natural Language API - English Gerund
Im using Google's NLP Api to analyze sentences and retrieve part of speech tokens form cells in a google drive sheet using appScript.
The problem is I can't retrieve or identify any of the words in the sentence as gerunds.
From documentation GERUND…

user1446988
- 333
- 1
- 6
- 22
0
votes
1 answer
How can i return each line of blocks in the documentai-ocr processor response
I have analyzed my handwritten letter in documentai and have gotten the response. I want to further process the output such that i want to label each block as cluster123 and each line as label123 and also have the indentation characteristics of such…

adeshina Ibrahim
- 51
- 6
0
votes
1 answer
Google Natural Language Sentiment Analysis incorrect result
We have Google Natural AI integrated into our product for Sentiment Analysis (https://cloud.google.com/natural-language). One of the customers complained that when they write "BAD" then it shows a positive sentiment.
On further investigation, we…

KRS
- 132
- 2
- 12
0
votes
1 answer
How to make Cloud Natural Language classifyText API work with AppScript
I dont know why this is working. This code below works for analyzeSentiment.
function analyzeText() {
var apiKey = 'myapi';
var text = 'I really love dogs!';
var requestUrl =…

Kojak Eugenio
- 29
- 4
0
votes
1 answer
Splitting Google sentiment analysis response into separate columns and generating `None` for cells with no value
Goal
I want to split the response from Google Sentiment Analysis into four columns, then merge with original content dataframe.
Situation
I'm running the Google sentiment analysis on a column of text in a python dataframe.
Here's a sample for one of…

dsx
- 167
- 1
- 12
0
votes
1 answer
How to split a pandas dataframe column with key/value pairs into multiple columns?
Situation
I've run Google's NLP sentiment analysis, which returned the column 'sentiment' with key value pairs for magnitude and score, per below:
Sentiment Analysis Results
This is my results, in the sentiment column, for dataframe…

dsx
- 167
- 1
- 12