pip install textblob pip install textblob pip install textblob-aptagger python from textblob import TextBlob python import nltk nltk.download("punkt") python blob = TextBlob(text) words = blob.words print(words) python blob = TextBlob(text) tags = blob.tags print(tags) python blob = TextBlob(text) sentiment = blob.sentiment print(sentiment) Sentiment(polarity=1.0, subjectivity=0.75) python blob = TextBlob(text) translation = blob.translate(to='en') print(translation.text) "Chinese text processing is very interesting"


上一篇:
下一篇:
切换中文