Commit eb8bec91 authored by Dhananjaya Jayashanka's avatar Dhananjaya Jayashanka

Updated textAnalyze(NLTK).py

parent 6d1d5761
...@@ -6,6 +6,7 @@ from nltk.sentiment.vader import SentimentIntensityAnalyzer ...@@ -6,6 +6,7 @@ from nltk.sentiment.vader import SentimentIntensityAnalyzer
from nltk.stem import WordNetLemmatizer from nltk.stem import WordNetLemmatizer
from nltk.tokenize import word_tokenize from nltk.tokenize import word_tokenize
text = open('read.txt', encoding='utf-8').read() text = open('read.txt', encoding='utf-8').read()
lower_case = text.lower() lower_case = text.lower()
cleaned_text = lower_case.translate(str.maketrans('', '', string.punctuation)) cleaned_text = lower_case.translate(str.maketrans('', '', string.punctuation))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment