Esempio n. 1
0
print(blob.sentiment)  #evaluates how pos vs neg statment is

sentences = blob.sentences

for sentence in sentences:
    print(sentence.sentiment)

print(blob.detect_language())

spanish = blob.translate(to="es")  #translate statement to spanish!

print(spanish)

from textblob import Word

index = Word("index")

print(index.pluralize())

animals = TextBlob('dog cat fish sheep bird').words

print(animals.pluralize())  #pluralizes words in blob

word = Word("theyr")

print(word.spellcheck())

print(word.correct())

#sentence = TextBlob("This sentence has misspelled wrds.")
Esempio n. 2
0
print(blob.detect_language())

spanish = blob.translate(to='es')

print(spanish)

from textblob import Word

index = Word('index')

print(index.pluralize())

animals = TextBlob('dog cat fish sheep bird').words

print(animals.pluralize())

cacti = Word('cacti')

print(cacti.singularize())

word = Word('theyr')

#returns the possible solutions and the percentage that they recomend which option
print(word.spellcheck())

word.correct()

print(word)

sentence = TextBlob('Ths sentense has missplled wrds.')
index.pluralize()

cacti=Word('cacti')

cacti.singularize()

cactus=Word('cactus')

cactus.pluralize()

from textblob import TextBlob

animals=TextBlob('Dog Cat Fish Bird').words

animals.pluralize()

"""# Harvesting Data from Twitter
- Tweepy > 3.7
- geopy

"""

import tweepy #This is the Gateway to using Twitter APIs

"""- Authenticate with the Twitter"""

import keys

"""   - We need to create and configure an OAuthHandler to Authenticate Twitter """