limpiar_shorthands: Clean shorthands and abbreviations

View source: R/limpiar_shorthands.R

limpiar_shorthandsR Documentation

Clean shorthands and abbreviations

Description

Replaces common Spanish shorthands and abbreviations with their longer form equivalents. Choose whether to link the replacements with snake case or not, with spaces_as_underscores. Useful primarily for normalising text ahead of sentiment classification.

Usage

limpiar_shorthands(
  df,
  text_var = mention_content,
  spaces_as_underscores = FALSE
)

Arguments

df

Name of Data Frame or Tibble object

text_var

Name of text variable/character vector

spaces_as_underscores

Whether multi-word corrections e.g. 'te quiero mucho' should have spaces or underscores. Default = FALSE

Value

The text variable with shorthands replaced

Examples

limpiar_examples %>% dplyr::select(mention_content)

limpiar_examples %>% limpiar_shorthands() %>% dplyr::select(mention_content)


jpcompartir/LimpiaR documentation built on April 6, 2024, 5:22 a.m.