Created
August 28, 2015 02:26
-
-
Save raulgarreta/36d66e908a964b6547d4 to your computer and use it in GitHub Desktop.
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 requests | |
import json | |
data = { | |
'text_list': ["This is a text to try language detection.", | |
"This is some more text"] | |
} | |
response = requests.post( | |
"https://api.monkeylearn.com/v2/classifiers/cl_oJNMkt2V/classify/", | |
data=json.dumps(data), | |
headers={'Authorization': 'Token <YOUR TOKEN GOES HERE>', | |
'Content-Type': 'application/json'}) | |
print json.loads(response.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment