limpiar_recode_emojis: Recode emojis with a textual description

View source: R/limpiar_emojis.R

limpiar_recode_emojisR Documentation

Recode emojis with a textual description

Description

Main usage is for pre-processing the text variable as part of Deep Learning pipeline. The most important argument is whether or not to add the emoji tag, which will also print in snake case.

Usage

limpiar_recode_emojis(data, text_var = mention_content, with_emoji_tag = FALSE)

Arguments

data

Name of your Data Frame or Tibble object

text_var

Name of your text variable. Can be given as a 'string' or a symbol - should refer to a column inside data

with_emoji_tag

Whether to replace with snakecase linked words or not

Value

The Data Frame or Tibble object with most emojis cleaned from the text variable

Examples

 emojis <- data.frame(
 text = c("Hello πŸ‘‹ World",
  "Family: πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦",
  "Coding πŸ‘¨πŸ½β€πŸ’»",
  "Flags πŸ³οΈβ€πŸŒˆ πŸ‡ΊπŸ‡Έ",
  "Weather β˜€οΈ β›ˆοΈ ❄️")
)

emojis

# Without tagging and combining:
limpiar_recode_emojis(emojis, text)

# With tagging and combining:
limpiar_recode_emojis(emojis, text, TRUE)

# using limpiar_remove_emojis() to remove them entirely:
limpiar_remove_emojis(emojis, text)


jpcompartir/LimpiaR documentation built on Dec. 9, 2024, 9:43 p.m.