How to create a Sentiment Analysis workflow in Sparkflows?

To create sentiment analysis workflow we will open pyspark workflow type and follow following steps:-

1 - Read csv file using Read CSV Node. Make sure that the file contains text column.

2 - Select “Hugging Face Sentiment Analysis Node” and configure it to select column on which you want to analyze sentiment.

3 - Select Model. You can choose a pre-trained model from a dropdown menu in the Sentiment Analysis Node. Alternatively, you can provide the path to a custom pre-trained model for more specialized analysis.

4 - If you want top words affecting sentiments to be displayed in the output, select “True” in the Node.

5 - Use “Print N Rows Node” to view the output in execution mode.

6 - Save data for further use like creating graphs, etc.

In the output shown above:

  • Label Column displays the Sentiments as Positive and Negative.
  • Score Column displays the sentiment score.
  • Influential_word Column displays the words affecting sentiment analysis.