Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -1,11 +1,47 @@
|
|
1 |
---
|
2 |
license: cc-by-4.0
|
|
|
3 |
language:
|
4 |
-
- id
|
5 |
tags:
|
6 |
-
- sentiment-analysis
|
7 |
-
- e-commerce
|
8 |
-
-
|
9 |
-
|
10 |
-
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: cc-by-4.0
|
3 |
+
dataset: PRDECT-ID
|
4 |
language:
|
5 |
+
- id
|
6 |
tags:
|
7 |
+
- sentiment-analysis
|
8 |
+
- e-commerce
|
9 |
+
- indonesian
|
10 |
+
---
|
11 |
+
# PRDECT-ID Dataset
|
12 |
+
|
13 |
+
## Deskripsi
|
14 |
+
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.
|
15 |
+
|
16 |
+
## Sumber
|
17 |
+
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).
|
18 |
+
|
19 |
+
## Struktur Dataset
|
20 |
+
Dataset tersedia dalam format CSV dengan kolom berikut:
|
21 |
+
- `Customer Review`: Teks ulasan pelanggan (bahasa Indonesia).
|
22 |
+
- `Customer Rating`: Skor ulasan (1 hingga 5).
|
23 |
+
- `Sentiment`: Label sentimen (Positive, Negative).
|
24 |
+
- `Emotion`: Emosi dominan (Happy, Love, Anger, Fear, Sadness).
|
25 |
+
|
26 |
+
**Distribusi Kelas**:
|
27 |
+
- Buruk: 2.821 ulasan
|
28 |
+
- Bagus: 2.522 ulasan
|
29 |
+
- Normal: 57 ulasan
|
30 |
+
|
31 |
+
## Penggunaan
|
32 |
+
Dataset ini digunakan untuk melatih model SVM dan Naive Bayes dalam proyek analisis sentimen. Contoh kode untuk memproses dataset:
|
33 |
+
|
34 |
+
```python
|
35 |
+
import pandas as pd
|
36 |
+
from nltk.sentiment.vader import SentimentIntensityAnalyzer
|
37 |
+
import text2emotion as te
|
38 |
+
|
39 |
+
# Load dataset
|
40 |
+
data = pd.read_csv('PRDECT-ID.csv')
|
41 |
+
|
42 |
+
# Ekstraksi fitur NLP
|
43 |
+
sid = SentimentIntensityAnalyzer()
|
44 |
+
data['Sentiment'] = data['Customer Review'].apply(lambda x: 'Positive' if sid.polarity_scores(str(x))['compound'] >= 0 else 'Negative')
|
45 |
+
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')
|
46 |
+
|
47 |
+
print(data[['Customer Review', 'Sentiment', 'Emotion']].head())
|