Beispiel #1
0
text.title

text.words[-1].singularize()
text.words[3].pluralize()

from text.blob import Word
from text.blob import Verb

#Lemmatization
w = Word("octopi")
w.lemma

#Spelling Correction
a = TextBlob("I aem one oef a kind cheat")
print(a.correct())

t = Word('Astonised')
t.spellcheck()

#Word counts
text = TextBlob(
    "One time there was this pycheat in github. And it was Github where all the cheats were"
)
text.word_counts['github']

#Translation
text = TextBlob("Frankly!Can I get a cup of coffe con leche in plaza Mayor?")
text.detect_language()
text.translate(to="es")
Beispiel #2
0
text.title

text.words[-1].singularize()
text.words[3].pluralize()


from text.blob import Word 
from text.blob import Verb

#Lemmatization
w = Word("octopi")
w.lemma

#Spelling Correction
a = TextBlob("I aem one oef a kind cheat")
print(a.correct())

t = Word('Astonised')
t.spellcheck()

#Word counts
text = TextBlob("One time there was this pycheat in github. And it was Github where all the cheats were")
text.word_counts['github']

#Translation
text = TextBlob("Frankly!Can I get a cup of coffe con leche in plaza Mayor?")
text.detect_language()
text.translate( to="es")

#Parsing