This project classifies 2,400 fictional Indonesian product reviews as positive or negative. Text is turned into word attributes with TF-IDF weighting, Naive Bayes and SVM are compared, and the most influential words are shown for the marketing team.
Business Goal
Turn Indonesian customer reviews into positive or negative sentiment. Application area: Digital Marketing. Project level: advanced.
RapidMiner Tools and Operators
The process is built with these operators:
- Read CSV
- Remap Binominals
- Generate Attributes
- Select Attributes
- Generate TFIDF
- Replace Missing Values
- Split Data
- Multiply
- Weight by Information Gain
- Naive Bayes
- Support Vector Machine (LibSVM)
- Apply Model
- Performance (Binominal Classification)
- Performance to Data
- Weights to Data
- Write CSV
What You Will Learn
- Understand the text-mining flow: words to attributes, TF-IDF, then classification
- Compare Naive Bayes and SVM for text on the same test data
- Find which words most determine sentiment as input for product and service improvements
Working Steps
- Read the reviews — Read CSV loads ulasan_produk.csv (2,400 reviews). The ulasan column is read as text, sentimen as a binominal label and id_ulasan as the id.
- Define the positive class — Remap Binominals sets "positif" as the positive class and "negatif" as the negative class.
- Turn text into word attributes — Generate Attributes creates one 0/1 column per keyword (e.g. w_bagus, w_kecewa) with the formula if(contains(lower(ulasan),"bagus"),1,0). Phrases such as "tidak puas" are included so negation is captured. This is equivalent to the tokenising stage of text-processing operators.
- Select the word attributes — Select Attributes with the regular expression w_.* keeps only the word columns and the label; the original text is removed.
- Apply TF-IDF weighting — Generate TFIDF gives higher weight to words that appear in fewer reviews. Replace Missing Values fills 0 for reviews with no keyword.



