Created
September 2, 2017 10:58
-
-
Save rohit-gupta/0247e917d7fb87f6b7fb8650fc342c01 to your computer and use it in GitHub Desktop.
NLTK Sentiment Analysis Basics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nltk.tokenize import sent_tokenize | |
text = """All of the MSM is fake news at this point. Their blind hatred of Trump has caused them to throw away what credibility they once had. | |
#DeathToTheMSM""" | |
sent_tokenize_list = sent_tokenize(text) | |
for sentence in sent_tokenize_list: | |
print sentence |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment