View source: R/match_stopwords.R
match_stopwords | R Documentation |
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.
match_stopwords(df)
df |
Dataframe containing user reviews, with required columns |
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.
A modified dataframe with an additional cleaned_text
column containing stopword-free text.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.