Textblob issue on 3.5 - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Textblob issue on 3.5 (/thread-8629.html) |
Textblob issue on 3.5 - Sebt1890 - Mar-01-2018 Hey everyone! I have to use Textblob to translate a sentence to either Spanish or Arabic. Before I begin, I am running Ubuntu and boot up python via the "idle3" command. I have code for it on ready to go on 3.5 but it doesn't show work. However, when I boot up 2.7 using "idle" it works just fine. Can someone please help me figure out why it's not working on 3.5? I followed the directions on the Textblob website and the assignment is due tomorrow. I've spent the last few days searching Google and even put it up as a question on Stack Overflow with no results. Any help would be greatly appreciated :D EDIT: This is the code we started off with in the assignment to work off of. from textblob import TextBlob userInput = TextBlob("How are you?") translation = userInput.translate(to='ar') print (translation)EDIT 2: This is what I have in 2.7 from textblob import TextBlob userInput = TextBlob raw_input("Type sentence: ") translation = userInput.translate(to='es') print (translation) RE: Textblob issue on 3.5 - DeaD_EyE - Mar-01-2018 Do you get any traceback/error message? RE: Textblob issue on 3.5 - buran - Mar-01-2018 1. Stick to python 3, don't mix with python 2 2. how would you replace the hardcoded text "How are you?" from the example with user input? |