googleapis / googleapis/google-cloud-java

There should be way for providing List of Document for analyzeSentiment instead of single Document

未关闭
#11,371 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
priority: p2 type: feature request
主要语言
Java
星标
2.1k
派生
1.2k
平均合并
1 天 23 小时
30 天内合并 PR
157

描述

I am trying to get the Sentiment for the conversation between Agent and Customer on sentence level using **Google Cloud Natural Language API**.
But observation is, i have to call API for each sentence Is there any way to get the sentiment for List of Document And after Successfull Sentiment i am able to map that sentiment to each sentence.

Here is the snniped code which i tried for sentiment analysis

There is no way to give List of Document

```java
Document doc = Document.newBuilder()
.setContent(TEXT)
.setType(Document.Type.PLAIN_TEXT)
.build();
AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(doc);
Sentiment documentSentiment = response.getDocumentSentiment();
log.info("sentence:{}", fromObjectToJson(documentSentiment));
```

贡献指南

打开贡献指南

调研方向

Start with the Java analyzeSentiment call shown in the issue and review the Google Cloud Natural Language API's document and sentiment-analysis interfaces. Determine whether list-based analysis is supported and what response structure would allow sentiments to be mapped back to sentences; the issue is done when the supported approach or required API change is clearly established.

由索引模型根据 Issue 内容生成。

评估

技术栈
google-cloud, java
领域
api
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。