计算 Twitter 上特定单词的结果数 [英] Count number of results for a particular word on Twitter
问题描述
为了推进我的一个个人项目,我一直在思考如何计算 Twitter 上用户指定单词的结果数量.我已经广泛地使用了他们的 API,但一直无法想出一种有效的甚至半实用的方法来计算特定单词的出现次数.实际结果并不重要,只是总体计数.我会一直挠头.任何想法或方向将不胜感激.
To further a personal project of mine, I have been pondering how to count the number of results for a user specified word on Twitter. I have used their API extensively, but have not been able to come up with an efficient or even halfway practical way to count the occurrences of a particular word. The actual results are not critical, just the overall count. I'll keep scratching my head. Any ideas or direction pointing would be most appreciated.
例如http://search.twitter.com/search?q=tomatoes
推荐答案
我可以回去大约一周.我用 Adam 发布的参数开始搜索,然后从搜索结果集中最小的 id 开始,像这样,http://search.twitter.com/search.atom?lang=en&q=iphone&rpp=100&max_id=其中 max_id = 我刚刚提取的 100 个结果的 min(id).
I'm able to go back about a week. I start my search with the parameters that Adam posted and then key off of the smallest id in the set of search results, like so, http://search.twitter.com/search.atom?lang=en&q=iphone&rpp=100&max_id= where max_id = the min(id) of the 100 results I just pulled.
这篇关于计算 Twitter 上特定单词的结果数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!