USEFUL LINKES-
https://www.google.co.in/amp/s/www.geeksforgeeks.org/get-synonymsantonyms-nltk-wordnet-python/amp/
https://www.google.co.in/amp/s/www.geeksforgeeks.org/tokenize-text-using-nltk-python/amp/ https://pythonprogramming.net/wordnet-nltk-tutorial/ https://pythonprogramming.net/tokenizing-words-sentences-nltk-tutorial/ http://insightsbot.com/blog/R8fu5/bag-of-words-algorithm-in-python-introduction
we have positive word dictionary,negative word dictionary and a text file(with paragraphs). we have to write a program to tokenize key words from the text file . Then match those key words with positive and negative file. if the key word is matched with any of these file the store it in destinationposfile or destinationneg file. If the key word is not found then collect synonyms of that key word and again try to match those words with positive or negative file , if match found then store that key word in a destination file and if not found then store that key word in destinationnutral file.