我正在使用 tm 包来清理 Twitter 语料库。但是,该软件包无法清理表情符号。
\n\n这是复制的代码:
\n\nJuly4th_clean <- tm_map(July4th_clean, content_transformer(tolower))\nError in FUN(content(x), ...) : invalid input 'RT ElleJohnson Love of country is encircling the globes \xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd july4thweekend July4th FourthOfJuly IndependenceDay NotAvailableOnIn' in 'utf8towcs'\n
Run Code Online (Sandbox Code Playgroud)\n\n有人可以指出我使用 tm 包删除表情符号的正确方向吗?
\n\n谢谢你,
\n\n路易斯
\n