Wizard Book


Programming Python, Web, Android

Python: Menghilangkan Stop Word Bahasa Indonesia dengan Sastrawi

Menghilangkan kata stopword dalam kalimat Bahasa Indonesia dengan Python Sastrawi

from Sastrawi.StopWordRemover.StopWordRemoverFactory import StopWordRemoverFactory

remover = StopWordRemoverFactory().create_stop_word_remover()

d1 = "Saya sedang berkebun di halaman rumah"
d2 = "Saya berkebun di belakang rumah"
d3 = "Kamu berkebun buah-buahan"

D = [d1,d2, d3]

comment = []
for i in D: 
    lower = i.lower()
    clean = remover.remove(lower)
    comment.append(clean)   
print (comment)

email : contohprogram.com@gmail.com
WA : +6289671400363