Skip to content

onidzelskyi/python_language_classification

Repository files navigation

CircleCI

Python Language classification problem

Project' structure

docs/
    report.md           Report document
    task.md             Task description

pylangkit/
    naive_bayes.py      Implementation of Naive Bayes language classification algorithm

resources/
    lang_data.csv       Input dataset
    lang_data_test.csv  Test dataset
    lang_data_train.csv Train dataset
    test_model.pickle   Pickled trained model for testing purposes
    train_model.pickle  Pickled trained model for classification demo task

tests/
    test_naive_bayes.py Tests of Naive Bayes language classification algorithm

demo.py                 Demo app of language classification task

Input_Data_Analysis_and_Model_Training.ipynb    Ipyton notebook with data analysis, training model, classification task and evaluation.

LICENSE                 License file

README.md               this file with short description of project

requirements.txt        Requirements of libraries and packages

setup.py                Setup file for package installation

Environment setup

Install virtualenv

sudo apt install python-pip
pip install virtualenvwrapper

Add next lines to /.bashrc (/.profile)

export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel

# load virtualenvwrapper for python (after custom PATHs)
venvwrap="virtualenvwrapper.sh"
/usr/bin/which $venvwrap
if [ $? -eq 0 ]; then
    venvwrap=`/usr/bin/which $venvwrap`
    source $venvwrap
fi

Run script

. ~/.local/bin/virtualenvwrapper.sh

Create virtual environment

mkvirtualenv -p python3.5 langkit

Install dependencies

pip install -r requirements.txt

install the package locally (for use on our system)

pip install -e .

Run tests

pytest tests

Run demo app

python demo.py

About

Python Language classification problem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published