广告专业用词_用词袋进行情感分析

广告专业用词

Sentiment analysis is the process of determining whether a piece of text is positive or negative. It allows businesses to identify their customer’s sentiments towards products or services through reviews and online feedback.

情感分析是确定一段文字是肯定的还是否定的过程。 它使企业可以通过评论和在线反馈来识别客户对产品或服务的情感。

For Example:

例如:

Image for post

In other words, sentiment analysis gives an opportunity to explore the mindset of your customers and study the state of your product or service from your customer’s point of view.

换句话说,情感分析使您有机会探索客户的心态,并从客户的角度研究产品或服务的状态。

This makes sentiment analysis a great tool for

这使得情绪分析成为

  1. Product reviews

    产品评论
  2. Market research

    市场调查
  3. Customer service

    客户服务
  4. Social media monitoring

    社交媒体监控
  5. Reputation management etc.,

    声誉管理等

Sentiment analysis is a filed of Natural language processing(NLP).

情感分析属于自然语言处理(NLP)。

INTRODUCTION

介绍

The dataset which we are using contains, restaurant reviews and we are going to use sentiment analysis to find wheater a particular review is positive or negative. If the review is negative we will display the following message.

我们正在使用的数据集包含餐厅评论,我们将使用情感分析来查找特定评论为正面还是负面的小麦。 如果评论是否定的,我们将显示以下消息。

Thank you <customer first name> for taking out the time to write a review. we apologize for the inconvenience caused. We hope we will get a chance to serve you better in the near future.

感谢<客户的名字>抽出宝贵的时间写评论。 不便之处,敬请原谅。 希望我们在不久的将来有机会为您提供更好的服务。

If the review is positive we will display the following message.

如果评论为肯定,我们将显示以下消息。

<Customer first name>, Thank you so much for that awesome review. We look forward to serving you again in the near future.

<客户的名字>,非常感谢您的好评。 我们期待在不久的将来再次为您服务。

应遵循的步骤 (Steps to be Followed)

  1. Importing the libraries.

    导入库。
  2. Importing the dataset.

    导入数据集。
  3. Cleaning the data.

    清理数据。
  4. Creating the Bag of words.

    创建单词袋。
  5. Training and classification.

    培训和分类。
  6. Confusion matrix.

    混淆矩阵。
  7. Predicting a customer review.

    预测客户评论。

Step1: Importing the Libraries

步骤1:导入库

Image for post

Step2: Importing the Dataset

步骤2:导入数据集

Image for post
Image for post

Step3: Cleaning the data

步骤3:清除资料

From the above dataset output, we will find some information that does not help in determining whether a review is positive or negative.

从上面的数据集输出中,我们将发现一些信息,这些信息无助于确定评论是肯定的还是否定的。

For example, words like a, an, the, was, on, etc, doesn't have any impact on the decision. These words are called Stopwords. We also have words like loved, stopped, loving, etc, we will have to convert them to its root form.

例如,诸如“ a”,“ an”,“ the”,“ was”,“ on”等之类的词对决策没有任何影响。 这些单词称为停用词。 我们也有喜欢,停止,爱等词语,我们将不得不将其转换为其根形式。

Image for post

Step4: Creating a bag of words

第4步:创建一袋文字

The bag of words is the simplest form of text representation in numbers. To learn more about bag of words — click here

单词袋是最简单的数字表示形式。 要了解有关单词袋的更多信息,请单击此处

Image for post

Step5: Training and Classification

步骤5:培训和分类

We have to split our dataset into training and testing sets, and then we have to apply the classification model.

我们必须将数据集分为训练和测试集,然后再应用分类模型。

Classification Algorithms

分类算法

  1. Linear classifier: Logistic regression, Naive Bayes classifier

    线性分类器:逻辑回归,朴素贝叶斯分类器
  2. Nearest neighbors.

    最近的邻居。
  3. Support vector machine.

    支持向量机。
  4. Decision tree.

    决策树。
  5. Random forest etc..,

    随机森林等。,

We can use any one of them, I tried all and surprisingly Naive Bayes gives the best accuracy.

我们可以使用其中的任何一个,我都尝试了所有,令人惊讶的是,朴素的贝叶斯给出了最好的准确性。

Image for post

Step6: Classification model

步骤6:分类模型

It is a tool, used for evaluation of the performance of a classification model. If you want to learn more about this — Click here.

它是一种工具,用于评估分类模型的性能。 如果您想了解更多有关此信息—单击此处

Image for post

The accuracy of our model is 73%, which means 73% of the predictions are accurate.

我们模型的准确性为73%,这意味着73%的预测是准确的。

Step7: Final step - Predicting a customer review

步骤7:最后一步-预测客户评论

Image for post
Image for post

I hope you find this article helpful. If I’ve missed anything, let me know in the comment section.

希望本文对您有所帮助。 如果我错过了任何事情,请在评论部分让我知道。

What do you think about this blog? Comment!!!

您如何看待该博客? 评论!!!

Follow me @ Medium | LinkedIn

跟我来@| 领英

Thanks for reading!

谢谢阅读!

翻译自: https://medium.com/@subhani1/sentiment-analysis-with-bag-of-words-4b9786e967ca

广告专业用词

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值