3 ms·
>Where would one modify this code to filter different sentiments? Right here: https://github.com/garritfra/positive_hackernews/blob/main/main.py#L47 https://gi
by bertman 2y ago
>Where would one modify this code to filter different sentiments?
Right here:
https://github.com/garritfra/positive_hackernews/blob/main/main.py#L47 https://github.com/garritfra/positive_hackernews/blob/main/m...
This project uses the sentiment analyzer provided by the NLTK toolkit [0]. The `SentimentIntensityAnalyzer` class assigns polarity scores to its text input, where a score >=0 denotes a "positive valence".
[0]:https://www.nltk.org/api/nltk.sentiment.SentimentIntensityAnalyzer.html?highlight=sentimentintensityanalyzer#nltk-sentiment-sentimentintensityanalyzer https://www.nltk.org/api/nltk.sentiment.SentimentIntensityAn...