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.
Examples
emojis <- data.frame(
text = c("Hello π World",
"Family: π¨βπ©βπ§βπ¦",
"Coding π¨π½βπ»",
"Flags π³οΈβπ πΊπΈ",
"Weather βοΈ βοΈ βοΈ")
)
emojis
#> text
#> 1 Hello π World
#> 2 Family: π¨βπ©βπ§βπ¦
#> 3 Coding π¨π½βπ»
#> 4 Flags π³οΈβπ πΊπΈ
#> 5 Weather βοΈ βοΈ βοΈ
# Without tagging and combining:
limpiar_recode_emojis(emojis, text)
#> text
#> 1 Hello waving hand World
#> 2 Family: man β woman β girl β boy
#> 3 Coding man π½β laptop
#> 4 Flags white flag οΈβ rainbow flag: United States
#> 5 Weather sun οΈ cloud with lightning and rain οΈ snowflake οΈ
# With tagging and combining:
limpiar_recode_emojis(emojis, text, TRUE)
#> text
#> 1 Hello waving_hand_emoji World
#> 2 Family: man_emoji β woman_emoji β girl_emoji β boy_emoji
#> 3 Coding man_emoji π½β laptop_emoji
#> 4 Flags white_flag_emoji οΈβ rainbow_emoji flag:_United_States_emoji
#> 5 Weather sun_emoji οΈ cloud_with_lightning_and_rain_emoji οΈ snowflake_emoji οΈ
# using limpiar_remove_emojis() to remove them entirely:
limpiar_remove_emojis(emojis, text)
#> text
#> 1 Hello World
#> 2 Family: βββ
#> 3 Coding β
#> 4 Flags β
#> 5 Weather