Skip to content

Instantly share code, notes, and snippets.

@peckjon

peckjon/translate.py

Created Jul 31, 2018
Embed
What would you like to do?
pre-translation in NLP
import Algorithmia
client = Algorithmia.client("your_api_key")
algo_input = {
"action": "translate",
"text": "Me gustan los aguacates"
}
translated_text = client.algo("translation/GoogleTranslate/0.1.1").pipe(algo_input).result["translation"]
# Prints: I like avocados
print translated_text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.