Created
March 3, 2014 15:34
-
-
Save zdepablo/9327454 to your computer and use it in GitHub Desktop.
Tag a twitter using Textalytics Media Analysis API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smaclient | |
license_key = <textalytics-license-key>; | |
textalytics = smaclient.SmaClient(license_key) | |
doc = smaclient.Document('0', 'Italia se indigna por la negativa de #Barilla a hacer anuncios con gays') | |
doc.language = 'es' | |
doc.source = 'TWITTER' | |
response = textalytics.analyze(doc) | |
print 'Sentiment: ',response.result.sentiment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment