DEV Community

Discussion on: Content Sentiment Analysis: Explore the emotion score of your content with Google API

Collapse
 
vadorequest profile image
Vadorequest

An option to decide whether do the sentiment analysis per file or per "block" could be handful.

I recently worked with sentiment analysis, with sentences written within a Excel file. I could easily convert that Excel file into one HTML file, and split each sentence by a div or a CSS class, and then I could easily get the result using your Action.

Regarding your results display question, I advise to keep something visual, like what you did with the table in the output. It would definitely be great to have it both as Action comment (as shown above) and as PR comment (for history and easier/faster visualization).
I'd also advise to generate a JSON artifact that's included with the "run".

That's what I do with my 2E2 tests, I store the screenshots and videos as artifacts. See github.com/UnlyEd/next-right-now/r...

Having such artifact would allow the owner to actually use those results programmatically quite easily. (table is great for visualization)

Collapse
 
bogdaaamn profile image
Bogdan Covrig

Thanks a lot @vadorequest for the input! Really appreciate it 🙌🏻

An option to decide whether do the sentiment analysis per file or per "block" could be handful.

That is a great idea, I actually thought about that myself. From my experience, when we usually run sentiment analysis on actual documents, we do it for the whole document. But I see how there is a content issue there. While papers are meant to be written about the same topic, on a website you have different sections that might be totally unrelated and have a different tone, vibe, or language. So I think an option to switch between those would be really helpful.

It would definitely be great to have it both as Action comment (as shown above) and as PR comment (for history and easier/faster visualization).

Thank you for that, I totally agree. I am currently trying to sort out @actions/github and then I will jump on the PR comment.

Having such artifact would allow the owner to actually use those results programmatically quite easily. (table is great for visualization)

This is such a great idea, never thought about how should I take this programmatically to the next steps.

Thanks for sharing UnlyEd/next-right-now, you have really nice pipelines in there.

Collapse
 
vadorequest profile image
Vadorequest

Thanks! Glad it helped :)