Coder Social home page Coder Social logo

chats-project's Introduction

Chat Analysis

image

The goal of this project is to analyze the conversations of my team to ensure they are happy ๐Ÿ˜ƒ.

Main goal

Analyze the conversations coming from a chat like slack

How?

(L1) Writing an API in Flask just to store chat messages in mySQL

(L2) Extracting sentiment from chat messages and perform a report over a whole conversation

(L3) Recommending friends to a user based on the contents from chat documents using a recommender system with NLP analysis

(L4) Creating an image of the API with Docker --> In process

(L5) Heroku --> In process

API endpoints

@app.route('/')
  • Returns all data of MySQL database
@app.route('/add', methods=['POST'])
  • Add new user: Username, text, idChat, idUser, idMessage
@app.route('/edit/<string:idMessage>')
  • To edit users
@app.route('/update/<string:idMessage>', methods = ['POST']')
  • To confirm user update successfully
@app.route('/delete/<string:idMessage>')
  • To delete users (you will have to confirm to continue with user deletion)
@app.route('/analyze/<string:idChat>')
  • Returns the sentiment analysis of the idChat. There are 3 values, positive, negative and neutral, whose sum is 1.
@app.route('/sentiment/<idUser>')
  • Returns the sentiment analysis of the idUser.
@app.route('/friendship/<name>')
  • Gives you a recommended friendship

Installation & Technologies

  1. Python 3.6

  2. LAMP: It is used to create and deploy dynamic web applications. To install LAMP in ubuntu 19.10

  • Linux --> operating system for the web application
  • Apache --> web server
  • Mysql --> database
  • Php --> to process dynamic content
  1. Flask: Framework that allows you to create web applications quickly and with a minimum number of lines of code.
  • Flask 1.1.1
  • Flask-MySQLdb 0.2.0 (to connect to Mysql)
  1. NLTK 3.4.5: set of libraries and programs for the processing of symbolic natural language and statistics for the Python programming language.

How to use?

  1. When you have everything installed, - I also installed MySQL Worckbench - you have to import the database that is in the input folder. How to do it? Very easy: in scheme, you create a new scheme, you click on it with the right button, and in the drop-down you select Table Data Import, and there you already select your file. It allows you to import both in .csv and .json format.

  2. You've to have a MySQL password. Save it in an .env under the name of the SECRET_KEY variable. E.g: SECRET_KEY = "your-password"

chats-project's People

Contributors

mariaversin avatar

Watchers

 avatar  avatar

Forkers

swipswaps

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.