The purpose of this project is to build an API from the scratch. The API analyzes texts and determines its polarity and its subjectivity(sentiment). Also, it establishes the affinity between people.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
What things you need to install the software and how to install them
from nltk.sentiment.vader import SentimentIntensityAnalyzer
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.metrics.pairwise import cosine_similarity as distance
from mongoConnection import user_mydb,user_mycol
from mongoConnection import group_mydb,group_mycol
from bson.json_util import dumps
from pymongo import MongoClient
from flask import Flask, request
import pandas as pd
import numpy as np
import nltk
import json
A step by step series of links that tell you how to run the project:
-
Count Vectorizer - This implementation produces a sparse representation of the counts using scipy.sparse.csr_matrix
-
NLTK - This a tool to implement and facilitate Sentiment Analysis tasks using NLTK features and classifiers, especially for teaching and demonstrative purposes
-
Write an API in MongoDB just to store chat messages in a database like mongodb or MySQL.
-
Extract sentiment from chat messages and perform a report over a whole conversation
-
Recommend friends to a user based on the contents from chat
documentsusing a recommender system withNLPanalysis.
You can find a demo in output folder in order to understand how the API works.
