Sentiment Analysis ด้วย Python
Violeta Misheva
Data Scientist
การวิเคราะห์ความรู้สึก คือกระบวนการทำความเข้าใจความคิดเห็นของผู้เขียนที่มีต่อหัวข้อใดหัวข้อหนึ่ง
องค์ประกอบที่ 1: ความคิดเห็น/อารมณ์

องค์ประกอบที่ 2: หัวข้อ
กล้องของโทรศัพท์รุ่นนี้ยอดเยี่ยม แต่อายุแบตเตอรีค่อนข้างน่าผิดหวัง
องค์ประกอบที่ 3: ผู้แสดงความคิดเห็น
data.head()
data.label.value_counts()
0 3782
1 3719
Name: label, dtype: int64
data.label.value_counts() / len(data)
0 0.504199
1 0.495801
Name: label, dtype: float64
length_reviews = data.review.str.len()
type(length_reviews)
pandas.core.series.Series
# Finding the review with max length
max(length_reviews)
0 667
1 2982
2 669
3 1087
....
length_reviews = data.review.str.len()
# Finding the review with min length
min(length_reviews)
0 667
1 2982
2 669
3 1087
4 724
....
Sentiment Analysis ด้วย Python