Repository navigation
Expand file tree
/
Copy pathReport.txt
More file actions
56 lines (53 loc) · 4.16 KB
/
Copy pathReport.txt
File metadata and controls
56 lines (53 loc) · 4.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Sentiment Analysis System - Project Report
1. Introduction
Sentiment Analysis is a Natural Language Processing (NLP) technique used to determine the sentiment of textual data. This project aims to classify text into three sentiment categories: "positive", "negative", and "neutral". The model which I have trained processes input texts, cleans them, converts them into numerical form using TF-IDF (Term Frequency - Inverse data Frequency) vectorization, and classifies it using a trained machine learning model.
2. Objectives
As menioned in the project summary , I have to develop a system to analyse sentiment from text inputs from the user. Utilize the feature of machine learning and Natural Language processing techniques to classify text into certain definable categories.And after these steps I ought to build a Graphical User Interface (GUI) for user interaction.
3. Tools used
1) Programming Language : Python
2) Libraries & Frameworks :
i) NLP : NLTK, TextBlob
ii) Machine Learning : scikit-learn
iii) GUI Development : PyQt5
iv) Data Handling : pandas, numpy
4. Implementation Steps
Step 1: Data Collection
i) I have collected and organised the data in the file named "raw_data.csv"
ii) I have collected neary 150 samples for more accuracy.
Step 2: Data Preprocessing
i) Convertion of the texts to lowercase.
ii) Removing the elements like punctuation, special characters, and stopwords.
iii) Tokenizing the texts using NLTK.
iv) Saving the cleaned data as `processed_data.csv`.
Step 3: Feature Extraction
i) Converting the processed text into numerical features using TF-IDF vectorization process.
ii) Saving the vectorizer (`tfidf_vectorizer.pkl`) for later use in prediction.
Step 4: Model Training
i) Training a machine learning model (train_model.py).
ii) Evaluating using accuracy, precision .
iii) Saving the trained model as sentiment_model.pkl.
Step 5: Model Testing
i) Load the trained model and vectorizer to know wheather the model give the desired output.
ii) Generating a classification report and accuracy score.
Step 6 : GUI Development
i) Designing an user-friendly interface for easy interaction between the user and system.
ii) Display real-time sentiment predictions.
iii) Implementation of buttons for clearing text and analyzing the sentiment.
Model Training Complete! Accuracy: 0.79
precision recall f1-score support
negative 0.78 0.88 0.82 8
neutral 0.89 0.80 0.84 10
positive 0.67 0.67 0.67 6
accuracy - - 0.79 24
macro avg 0.78 0.78 0.78 24
weighted avg 0.80 0.79 0.79 24
The model correctly classifies most neutral and positive sentiments but has room for improvement in identifying negative sentiments.
5. Conclusion
This sentimental analysis system helps to analyse the comments from youtube movie reviews , Instagram reel Comments and the comments or review from the desired Product to analyse wheather the Product or Movie is good or bad or it is okay. The individual action does not cause any effect but the group compilation can help them in the analysis , My mode is just a prototype for the project.
6. Example
If a Product description review has 1000 comments. If someone wants to know a proper analysis of the product and they could use the extended version of this model to recognise weather the given product is good or bad or okay.
i) Out of 1000 comments if 500 comments are good and 500 comments are bad then the Product is Just Okay or Average to use.
ii) Out of 1000 comments if 750 comments are good and 250 comments are bad then the Product is Above Average or Good to use.
iii) Out of 1000 comments if 250 comments are good and 750 comments are bad then the Product is Below Average or Bad to use.
iv) Out of 1000 comments if 900 comments are good and 100 comments are bad then the Product is Very Good to use.
iv) Out of 1000 comments if 100 comments are good and 900 comments are bad then the Product is Very Bad to use.