Twitter Streaming API-以确切的顺序跟踪确切的多个关键字 [英] Twitter Streaming API - tracking exact multiple keywords in exact order

查看:253
本文介绍了Twitter Streaming API-以确切的顺序跟踪确切的多个关键字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我才刚刚开始使用Twitter Streaming API.

I'm just beginning to play with the Twitter Streaming API.

如果我指定


$sc->setTrack(array('just bought from'));

这将仅正确提取具有所有3个关键字的推文-但不会保持顺序.

This will correctly pull only tweets that have all 3 keywords - but doesn't maintain the order.

1)我希望关键字以与

1) I want the keywords to appear in the same order like


"I just bought apple from itunes" 

但是上面也返回了


"I bought some apples and just removed them from the bag"

2)有没有办法指定说"NBA篮球"的确切词,中间什么也没有-从某种意义上说,我不希望这样的推文返回

2) Is there a way to specify the exact words say "NBA basketball" with nothing in between - in the sense I dont want tweets like this to be returned


Watching basketball on NBA tv

我只希望包含确切短语的推文像这样返回

I just want tweets which contain the exact phrase to be returned like


I love watching NBA basketball

3)还有一种方法可以指定否定关键字

3) Also is there a way to specify negative keywords

如果可能的话,任何提示. 谢谢

Any tips if this is possible. Thanks

推荐答案

当前,所有三个问题的答案均​​为否.一般建议是在您这一边进行此后期处理.否定关键字是一个被要求很多的东西,但是目前我们还没有一种方案可以让我们以可扩展的方式来支持它.

Currently the answer to all three questions is no. The general recommendation is to do this post processing on your side. The negative keyword is something that's been asked for quite a bit, but currently we don't have a scheme that would let us support this in a scalable way

这篇关于Twitter Streaming API-以确切的顺序跟踪确切的多个关键字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆