Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
santoshmallah opened this issue Dec 27, 2024 · 0 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@santoshmallah
Copy link

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

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));
@mpeddada1 mpeddada1 added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants