April 2018
Intermediate to advanced
280 pages
6h 18m
English
In this recipe, similar to the previous one, we'll extract some data from Twitter using the Twitter API. When the tweets are received as a stream, the Translation API is called to identify the language of the tweet. If the tweet is not in our target language, we will invoke the Translation API to perform the translation:
$ virtualenv ENV$ source ENV/bin/activate$ pip install -r requirements.txt
The following is the contents of the requirements.txt file:
google-cloud-translate==1.3.0tweepy==3.6.0