Based on AFINN-111 to do sentiment-analysis on Quora answers and blogposts .
- Scraped answers and blogposts from Quora and conveted them into .txt format .
- Ignored
- Stopwords
- Non-Alpha characters [ # , % , * , ! .. ]
- Words which have no sentiment score defined [words , text , answer ... ]
- Used the sentimental score-carrying words in AFINN-111.txt to deduce the overall sentiment of an answer or a blogpost .
python3 main.py [parameter]
Parameters:
pick_answer - pick answer directly
pick_profile - pick answers from profile
- Install requirements
pip install -r requirements.txt
- No priority assigned to words occuring multiple times in the text . ( didn't get weights to assign :/ )
- Text format contains words[upvotes , views , Sitemap] which should be part of an answer
- Ignored words for which scores aren't defined under AFINN-111.txt .
- Open for PR's and Issues .
- Some of the words which aren't included under AFINN-111.txt are ignored ( assigned a score of 0 ) in this case, however we can deduce score for those words . for example , if the word
hit
always appears in the proximity of words like sad or unhappy , then we can conclude that the wordhit
carries a negative sentiment . supporting paper
- The answers referenced under samples are picked up randomly .