<jupyter_start><jupyter_text>**PRA-PROCESSING** Stopword Removal<jupyter_code>import nltk
nltk.download('punkt')
from nltk.corpus import stopwords
nltk.download('stopwords')
vocab_size = 122
embedding_dim = 64
max_length = 50
trunc_type = 'post'
padding_type = 'post'
oov_tok = '<OOV>' #OOV = Out of Vocabulary
training_portion = 0.2
articles = []
labels = []

with open("kpp_serpong.csv", 'r') as csvfile:
    reader = csv.reader(csvfile, delimiter=',')
    next(reader)
    for row in reader:
        labels.append(row[0])
        article = row[1]
        for word in stopwords.words('indonesian'):
            token = ' ' + word + ' '
            article = article.replace(token, ' ')
            article = article.replace(' ', ' ')
        articles.append(article)
print(len(labels))
print(len(articles))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14200477326968974, 'fraction_numerical': 0.013126491646778043, 'mean_word_length': 3.661111111111111, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '492287', 'license': 'MIT', 'n_tokens_mistral': 307, 'n_tokens_neox': 292, 'n_words': 59, 'path': 'ProgressML/notebook/Bangkit2021.ipynb', 'repo_name': 'piyuid/final-project', 'size': '838'}