---
title: "Discussion on \"Sentiment analysis using NLTK SentimentIntensityAnalyzer and AFINN Lexicon\" | Hashnode"
description: "Discussion on \"Sentiment analysis using NLTK SentimentIntensityAnalyzer and AFINN Lexicon\". from nltk.sentiment import SentimentIntensityAnalyzer\n\n# Create an instance of the SentimentIntensityAnalyzer\nsia = SentimentIntensityAnalyzer()\n\n# Load the AFINN-111.txt file\nafinn_file = \"/content/AFINN-en-165.txt\"  # Replace with the actual path t..."
url: "https://hashnode.com/posts/sentiment-analysis-using-nltk-sentimentintensityanalyzer-and-afinn-lexicon/65e76aa50a7efaaef8058c42"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Sentiment analysis using NLTK SentimentIntensityAnalyzer and AFINN Lexicon](https://textlab.razzi.my/sentiment-analysis-using-nltk-sentimentintensityanalyzer-and-afinn-lexicon?utm_source=hashnode&utm_medium=feed)

from nltk.sentiment import SentimentIntensityAnalyzer # Create an instance of the SentimentIntensityAnalyzer sia = SentimentIntensityAnalyzer() # Load the AFINN-111.txt file afinn\_file = "/content/AFINN-en-165.txt" # Replace with the actual path t...

Mar 5, 2024 · 1 min read · textlab.razzi.my  
Read the article

-   [#sentiment-intensity-analyzer](https://hashnode.com/tag/sentiment-intensity-analyzer)

## Written by

[Mohamad Mahmood](https://hashnode.com/@mohamadrazzimy)

@mohamadrazzimy · Kuala Lumpur, Malaysia

  
[View profile](https://hashnode.com/@mohamadrazzimy)

Programming (Mobile, Web, Database and Machine Learning). Studying at the Center For Artificial Intelligence Technology (CAIT), FTSM, UKM MY

Mohamad's interest is in Programming (Mobile, Web, Database and Machine Learning). He is studying at the Center For Artificial Intelligence Technology (CAIT), Universiti Kebangsaan Malaysia (UKM).

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
