小编Man*_*adi的帖子

如何在我的python代码中输入阿拉伯语文本?

我的项目是用阿拉伯语识别积极或消极(情绪分析)的情绪,为了完成这个任务,我使用NLTK和python,当我输入阿拉伯语的推文时发生错误

>>> pos_tweets = [(' ????? ?? ??? ??? ????', 'positive'),
              ('?? ???? ?????? ????????', 'positive'),
              ('???? ??? ?? ??????', 'positive'),
              ('????? ????', 'positive'),
              ('???? ????? ?? ???? ?????????? ???????? ???????????', 'positive')]
Unsupported characters in input
Run Code Online (Sandbox Code Playgroud)

我怎么解决这个问题?

python unicode encoding utf-8

5
推荐指数
1
解决办法
4819
查看次数

标签 统计

encoding ×1

python ×1

unicode ×1

utf-8 ×1