Capture 'track' filter in a variable


#1

Hi,

I am filtering tweets for 10 phones and want to tag each tweet with the keyword it was filtered for.

For example:

Tweet1: Iphone6plus is big
Tweet2: nexus5 launched recently

and the filter I am using is as follows:
twitterStream.filter(track=[‘nexus5’,‘iphone6plus’],languages = [‘en’])

Final result(on my local):
Tweet1: (‘iphone6plus is big’,‘iphone6plus’)
Tweet2: (‘Nexus5 launched recently’,‘nexus5’)

Can I capture the filter words for which the tweets were streamed?

Thanks for your help!


#2

Currently this is not possible, as far as I know.


#3

@shridharmanvi, ePirat is correct, you will have to post-process the Tweet text within your application. If you were strictly using hashtags you could look in the entities object.