问题描述
我的操作员,周末愉快。我想从Twitter的API精确短语。如果我把它称为快乐周末,它需要同包括双quotes.But我想不包括双引号和精确短语,
My operator is, happy weekend. I want exact phrase from the Twitter API. If I give it as "happy weekend", it takes same including double quotes.But I want excluding double quotes and exact phrase,
鸣叫:祝你周末愉快--------->通过应用程序中抽取
鸣叫:祝你健康快乐周末--------->不受应用程序中抽取
tweet: I wish you a happy weekend ---------> extracted by application tweet: I wish you a happy and healthy weekend--------->not extracted by application
请帮助我在相同的。
我使用Scala 2.9.3和火花0.7.3。
I am using scala 2.9.3 and spark 0.7.3.
谢谢,
见Reddi
Thanks,Reddi
推荐答案
不幸的是,每的,在流API轨道终端不支持精确短语匹配。
Unfortunately, per the documentation, the track endpoint on the Streaming API does not support exact phrase matches.
一个短语可能是用空格分隔的一个或多个方面,如果一切一语中的条款都在鸣叫present,无论秩序和忽略大小写短语匹配。
您将不得不做一些额外的过滤器在您的斯卡拉code。
You'll have to do some additional filtering in your scala code.
这篇关于无法从星火流应用Twitter的API获取精确短语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!