如何解决我遇到TextBlob_ar的问题
我在使用Windows时遇到以下问题:
LookupError:在textblob_ar / data / model.jar中找不到stanford-postagger.jar jar文件
**code :
import os
os.environ["CLAsspATH"] = "C:/Users/FCIT 1/Desktop/stanford-tagger-4.1.0/stanford-postagger-full-2020-08-06"
os.environ["STANFORD_MODELS"] = "C:/Users/FCIT 1/Desktop/stanford-tagger-4.1.0/stanford-postagger-full-2020-08-06/models"
#stanford_tagger = StanfordPOSTagger('english-bidirectional-distsim.tagger')
from textblob_ar import TextBlob
# analysis the sentiment
def analyze_sentiment(tweet):
analysis = TextBlob(tweet)
if analysis.sentiment.polarity > 0:
return 'positive'
elif analysis.sentiment.polarity == 0:
return 'natural'
else:
return 'negative'
hi = "دري ليش فهم غلط"
print(analyze_sentiment(hi))**
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。