googleapis / googleapis/google-cloud-java

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

Đang mở
#11,371 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
priority: p2 type: feature request
Ngôn ngữ chính
Java
Star
2.1k
Fork
1.2k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
154

Mô tả

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));
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.