Open Elliot-Potts opened 7 years ago
@Elliot-Potts The u
is for unicode text in python. You can use str.encode("utf-8")
to turn it into a normal string.
hey @Elliot-Potts, I recently used this library in conjunction with pyttsx3 to read out definitions. Maybe you would find it interesting. https://github.com/b1tninja/misty/blob/main/definitions.py as for the u prefix, I believe that if you switched to python3 you wouldn't "see" the u. The strings in in python2 that were unicode showed with a u prefix when you used print(). perhaps text.decode('utf-8')
as @Modelmat suggested
Hello. Sorry for my ignorance here. I was just wondering how I'd remove the 'u' before each result. I am trying to get the synonym for (Example) word 'Hello', and then use PyTTSX to read it back to them, however I am unsure on how to remove the 'u' at the beginning of each word/synonym.
Any help would be greatly appreciated. Thanks.