File size: 1,936 Bytes
f3caba9
 
32343a6
f3caba9
32343a6
f3caba9
32343a6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: cc-by-4.0
dataset: PRDECT-ID
language:
  - id
tags:
  - sentiment-analysis
  - e-commerce
  - indonesian
---
# PRDECT-ID Dataset

## Deskripsi
Dataset PRDECT-ID berisi 5.400 ulasan pelanggan dari platform e-commerce Tokopedia, digunakan untuk analisis sentimen dan emosi dalam proyek pengembangan sistem analisis ulasan berbasis NLP. Dataset ini mencakup ulasan dalam bahasa Indonesia, dengan label sentimen dan emosi untuk mendukung klasifikasi produk ke dalam kategori Bagus, Normal, atau Buruk.

## Sumber
Dataset ini dikembangkan oleh Jocelyn Dumlao, et al., dan diambil dari [Mendeley Data](https://data.mendeley.com/datasets/574v66hf2v/1) dengan lisensi CC BY 4.0. Versi serupa juga tersedia di [Kaggle](https://www.kaggle.com/datasets/jocelyndumlao/prdect-id-indonesian-emotion-classification).

## Struktur Dataset
Dataset tersedia dalam format CSV dengan kolom berikut:
- `Customer Review`: Teks ulasan pelanggan (bahasa Indonesia).
- `Customer Rating`: Skor ulasan (1 hingga 5).
- `Sentiment`: Label sentimen (Positive, Negative).
- `Emotion`: Emosi dominan (Happy, Love, Anger, Fear, Sadness).

**Distribusi Kelas**:
- Buruk: 2.821 ulasan
- Bagus: 2.522 ulasan
- Normal: 57 ulasan

## Penggunaan
Dataset ini digunakan untuk melatih model SVM dan Naive Bayes dalam proyek analisis sentimen. Contoh kode untuk memproses dataset:

```python
import pandas as pd
from nltk.sentiment.vader import SentimentIntensityAnalyzer
import text2emotion as te

# Load dataset
data = pd.read_csv('PRDECT-ID.csv')

# Ekstraksi fitur NLP
sid = SentimentIntensityAnalyzer()
data['Sentiment'] = data['Customer Review'].apply(lambda x: 'Positive' if sid.polarity_scores(str(x))['compound'] >= 0 else 'Negative')
data['Emotion'] = data['Customer Review'].apply(lambda x: max(te.get_emotion(str(x)), key=te.get_emotion(str(x)).get) if te.get_emotion(str(x)) else 'Happy')

print(data[['Customer Review', 'Sentiment', 'Emotion']].head())