Skip to content

Django Application for Sentiment Analysis of Ukrainian texts

License

Notifications You must be signed in to change notification settings

jackshendrikov/sensus-web

Repository files navigation

Sensus Web

Admin Page

This site was designed for sentiment analysis of text documents on Ukrainian language, ordinary users can simply download documents, and admins, in this case just logged in users, can view all documents and perform selective sentiment analysis. The higher the estimated percentage of the result, the more positive the text.

📝  Requirements

  • Django (v3.1+)
  • Python (v3.7.10+)
  • Keras (v2.4.3)
  • Gensim (v3.8.3)
  • Gunicorn (v19.6+)
  • tensorflow-cpu (v2.1.0)
  • h5py (v2.10.0)
  • html5lib (v1.0.1+)
  • NumPy (v1.19.5)
  • NLTK (v3.5)
  • bleach (v3.0.2)
  • django-heroku (v0.3.1)
  • python-decouple (v3.4+)
  • pymorphy2-dicts-uk (v2.4.1+)
  • pymorphy2 (v0.9+)
  • psycopg2 (v2.8.6)

🚀  How to Run

  1. Clone this repository;

  2. Make sure that you have all the above requirements or do the following:

    1. cd to the directory where requirements.txt is located;
    2. activate your virtualenv;
    3. run: pip install -r requirements.txt in your shell.
  3. Download Word2Vec model (300Mb) with a corpus of word-vectors;

  4. Unzip the bz2 archive (~1Gb), for example using this application);

  5. Rename the file to model-word2vec-300d.txt;

  6. Move the file to the model/ folder in our application;

  7. Enter these commands in the console:

    >> python manage.py makemigrations
    >> python manage.py migrate
    >> python manage.py createsuperuser
    >> python manage.py runserver
  8. Then you will have to wait 5-10 minutes until the server starts and everything is ready!

📋  Overview

The models for sentiment analysis that were used in this project were created earlier in this project, where in 3 parts the whole process of data preparation and training of our model was described, a comparative analysis of classifiers and different models was conducted.

✨  Features

Feature Implementation
Conduct sentimental analysis of documents ✔️
Ability to upload text files to the server (.txt) ✔️
Log in to the server ✔️
Fantastic UI ✔️
Mobile-friendly ✔️
Ability to add any popular text file formats (.pdf, .doc, .odt)

📷  App Screenshots

Login Page Upload Page (Light Theme) Upload Page (Dark Theme)
Admin Page (Light Theme) Admin Page (Dark Theme) Predict Page

🎥  How It Works

Watch the video

📫  Get in touch