【发布时间】:2017-08-02 16:17:02
【问题描述】:
我正在使用 this 方法,但是当我尝试使用 lang="en" 指定英语时,我能想到的所有其他变体都不起作用。这就是我要输入的内容(即使使用关键字来进一步限制它),它仍然不只是给我英语。我尝试过使用和不使用关键字。我正在尝试为一个研究项目构建一个只有英语的 200,000 多条推文可搜索控制语料库,我不想手动浏览那么多推文。想法?
>>> from nltk.twitter import Twitter
>>> tw = Twitter()
>>> tw.tweets(keywords='Delicacy, reptile, death, hold, dark, column, gifted, surgeon, brave, fashion, pearl, diamond, bent, sparkle, present, missing, shadow, holiday, glide, scanner, luster, immunity, devour, discipline, barbaric, fortunate, heart, puzzle, ache, crystal',
limit=10000, lang="en", to_screen=False)
Writing to /Users/rhiannalavalla/twitter-files/tweets.20170521-235221.json
Written 10000 Tweets
【问题讨论】:
标签: python twitter nltk twython