Git Product home page Git Product logo

pk-sstu-ai-nlp-bot's Introduction

AI & NLP stend bot

This project is a bot for Telegram, which can find answers to questions based on the information from provided sources. The bot uses an artificial neural network and NLP techniques to find the most relevant answer.

Installation

Requirements

Setup

  • Clone the repository
git clone <repo_url>
  • Create a virtual environment and activate it
virtualenv venv
source venv/bin/activate
  • Install the requirements
pip install -r requirements.txt
  • Create a file named .env in the root directory of the project and fill it with the following data:
API_TOKEN=your_telegram_bot_token

Obtain the token from @BotFather

  • Run the bot
python bot.py

Usage

The bot is able to answer questions about the following topics:

  • SSTU (information for abiturients to help them get into the university, information about the university itself)

Machine learning

The bot uses a neural network to find the most relevant answer to the question. The model is trained on the dataset.json dataset. The model is trained using the Dmitry Korobchenko algorithm. You can train the model yourself using the training.ipynb notebook. Don't forget to provide your own dataset with most releted questions in your case.

NLP

The bot uses Navec and Natasha it self to get the vector representation of each word in the question and them sum them up to get the vector representation of the whole question. You can download the Navec model from here or train it yourself in order to increase the accuracy (see this for more information).

The bot uses JamSpell to correct the spelling of the question. However, the model is trained on a piece of Russian text, so it may not work well with some words. You can download the model from here or train it yourself (refer to this).

Restrictions

The bot is able to answer questions only in Russian because of the NLP models and tokenizer used in Natasha.

License

MIT

pk-sstu-ai-nlp-bot's People

Contributors

eddir avatar

Watchers

 avatar

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.