Skip to main content

Posts

Showing posts from September, 2020

Sentiment Analysis of Products and Services in Pakistan

 This blog post is about the dataset and sentiment analysis of the products and services provided in Pakistan. It's the first step in sentiment analysis for manufacturing industry related reviews of people. It took me some time to build this dataset with the help of a few students.  We have used the following products and services provided by the company for analysis. Let's begin with the implementation of SVM for sentiment analysis. Import necessary packages. import re import pickle import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics import precision_recall_fscore_support , accuracy_score from sklearn import svm Read the dataset and convert it to a list for further processing. raw_data = pd.read_csv( '../data/products_sentiment_urdu.csv' ) raw_data.head() # check the size of the data and its class d