match_stopwords {shoppingwords} | R Documentation |
Remove Stopwords from User Reviews
Description
This function processes a dataframe containing user reviews and removes predefined stopwords.
It first searches the package's internal stopwords dataset (stopwords_tr
), and if
no match is found, it falls back to the broader stopwords_iso
list.
Usage
match_stopwords(df)
Arguments
df |
Dataframe containing user reviews, with required columns |
Details
The function converts text to a standardized format by removing accents and special characters, transforming it into basic Latin characters, and making all letters lowercase. It then tokenizes the text, filters out stopwords, and returns the cleaned version.
Value
A modified dataframe with an additional cleaned_text
column containing stopword-free text.
Examples
reviews_sample <- tibble::tibble(
comment = c("Bu ürün xs ancak fiyatı yüksek gibi",
"Fiyat çok pahalı ama kaliteli iyi"),
rating = c(4.5, 3.0)
)
match_stopwords(reviews_sample)
[Package shoppingwords version 0.1.0 Index]