Big Data 6 - Implementation of Text Mining
Nama : Hasan Ramdani NIM : 22577003 Big Data 6 - Implementation of Text Mining # import libraries import pandas as pd import nltk from nltk.sentiment.vader import SentimentIntensityAnalyzer from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from nltk.stem import WordNetLemmatizer # download nltk corpus (first time only import nltk nltk.download( 'all' ) # Load the amazon review dataset df = pd.read_csv( 'https://raw.githubusercontent.com/pycaret/pycaret/master/datasets/amazon.csv' ) def preprocess_text ( text ): #Tokenize the text token = word_tokenize(text.lower()) #Remove stop word filtered_tokens = [token for ...