python中的Textblob模块对我不起作用

时间:2016-08-27 11:20:05

标签: python

这是代码......

import textblob
While True:
    print("Ok...")
    print("Enter the text....")
    text = input()
    blob = textblob.TextBlob(text)
    blob.translate(to = "de")

它要求发短信然后告诉我什么。任何帮助表示赞赏!

1 个答案:

答案 0 :(得分:1)

这是一个有效的例子:

import textblob

while True:
    text = input("Which text you want to translate:")
    blob = textblob.TextBlob(text)
    print("--> {0}".format(blob.translate(to = "de")))

您忘了打印德语翻译的字符串