0% found this document useful (0 votes)
5 views3 pages

Experiment 6

The document outlines an experiment on implementing sentiment analysis using Natural Language Processing (NLP) at SVKM’s NMIMS. It includes prerequisites, expected outcomes, theoretical background, basic Python libraries, machine learning tools, evaluation metrics, and tasks for students to complete. Students are required to select a dataset, preprocess data, apply machine learning libraries, and reflect on their learning and observations.

Uploaded by

hurt420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Experiment 6

The document outlines an experiment on implementing sentiment analysis using Natural Language Processing (NLP) at SVKM’s NMIMS. It includes prerequisites, expected outcomes, theoretical background, basic Python libraries, machine learning tools, evaluation metrics, and tasks for students to complete. Students are required to select a dataset, preprocess data, apply machine learning libraries, and reflect on their learning and observations.

Uploaded by

hurt420
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

SVKM’S NMIMS (Deemed-to-be University)

MUKESH PATEL SCHOOL OF TECHNOLOGY MANAGEMENT AND ENGINEERING


MUMBAI CAMPUS

Experiment No. 06

A.1 Aim:
To implement sentiment analysis using NLP

A.2 Prerequisite:
Basics of sentiment analysis, data preprocessing steps using python, Jupyter notebook

A.3 Outcome:
After successful completion of this experiment, students will be able to perform sentiment analysis
along with preprocessing of data.

A.4 Theory:

Sentiment Analysis, as the name suggests, it means to identify the view or emotion behind a
situation. It basically means to analyze and find the emotion or intent behind a piece of text or
speech or any mode of communication.

Sentiment analysis is analytical technique that uses statistics, natural language processing, and
machine learning to determine the emotional meaning of communications.

Basic Python Libraries

1. Pandas – library for data analysis and data manipulation


2. Matplotlib – library used for data visualization
3. Seaborn – a library based on matplotlib and it provides a high-level interface for data
visualization
4. WordCloud – library to visualize text data
5. re – provides functions to pre-process the strings as per the given regular expression

Natural Language Processing

1. nltk – Natural Language Toolkit is a collection of libraries for natural language processing
2. stopwords – a collection of words that don’t provide any meaning to a sentence
3. WordNetLemmatizer – used to convert different forms of words into a single item but still
keeping the context intact.

Scikit-Learn (Machine Learning Library for Python)

1. CountVectorizer – transform text to vectors


2. GridSearchCV – for hyperparameter tuning
3. RandomForestClassifier – machine learning algorithm for classification
SVKM’S NMIMS (Deemed-to-be University)
MUKESH PATEL SCHOOL OF TECHNOLOGY MANAGEMENT AND ENGINEERING
MUMBAI CAMPUS

Evaluation Metrics

1. Accuracy Score – no. of correctly classified instances/total no. of instances


2. Precision Score – the ratio of correctly predicted instances over total positive instances
3. Recall Score – the ratio of correctly predicted instances over total instances in that class
4. Roc Curve – a plot of true positive rate against false positive rate
5. Classification Report – report of precision, recall and f1 score
6. Confusion Matrix – a table used to describe the classification models

Reference videos:
https://www.youtube.com/watch?v=o1Bb7G4szQQ&t=3600s
Reference links:
https://cloud.google.com/natural-language/docs/sentiment-tutorial
https://towardsdatascience.com/text-preprocessing-in-natural-language-processing-using-python-
6113ff5decd8

PART B
(PART B : TO BE COMPLETED BY STUDENTS)
(Students must submit the soft copy as per following segments within two hours of the
practical. The soft copy must be uploaded on the portal or emailed to the concerned lab in
charge faculties at the end of the practical in case the there is no portal access available)

Roll. No. Name:


Class Batch:
Date of Experiment: Date of Submission:
Grade:

B.1 Task to do:


1. Select suitable sentiment analysis dataset available in public domain/kaggle
2. Preprocessing of data.
3. Apply machine learning libraries
4. Apply evaluation Metrics

B.2 Observations and Learning:


(Students must write the observations and learning based on their understanding built about the subject matter
and inferences drawn)

1. Provide screenshot for the task given and draft your understanding with different
observations.
SVKM’S NMIMS (Deemed-to-be University)
MUKESH PATEL SCHOOL OF TECHNOLOGY MANAGEMENT AND ENGINEERING
MUMBAI CAMPUS

B.3 Conclusion:
(Students must write the conclusive statements as per the attainment of individual outcomes listed above and
learning/observation noted in section B.2)

B.4 Curiosity Questions:

1. Identify use of sentiment analysis.


2. List challenges in sentiment analysis. Also mention methods to overcome these
challenges.

You might also like