Coder Social home page Coder Social logo

codes_bachelor_thesis's Introduction

codes for bachelor's thesis

Description

The main idea is to create a model with can easly detect toxic speech. The database is scraped from Wirtualna Polska and properly tagged.
The goal is to find the best combination of strings vectorizing and ML model.
Codes can be seperated into 2 categories:

  1. Preprocesing data
  2. Creation of a models
    The data is divided into full and partial in order to create 2 separated data base

Preprocesing

In Komentarze.py are comments scrapped from Wirtualna Polska, and tagged within categories: Groźby karalne, obraźliwe, złośliwe, krytykam, ostra krytyka, pozostałe.
In Lematized.py the prepare data for lematization: delete stop_words and nubmers, correct mistakes, and finally lematize all comments.
In prepare_dataframes.py scripts create a dataframes (for full and partial)
In word_2_vec_preaparation.py scripts transfers comments into vektors creating word2vec

Bow

In this folder scripts created ngrams bow vektors and put them into SVM, Random Forest, Gauss model, and gradient boost.
The best results are for unigram without long tails, (occurencess > 2), unfortunatelly bigrams, and trgigrams does not perform well,
Probably there are not enougth data to cover the problem.

word2vec

In this folder scripts created word2vec vektors and put them into SVM, Random Forest, Gauss model, and gradient boost.
There is problem with a tremendous number of input (2000), however SVM can easily compile great results (another models doesnt perform well)

doc2vec

In this folder scripts created doc2vec vektors and put them into SVM, Random Forest, Gauss model, and gradient boost.
This metod results better than word2vec (about 1-2%).

Results

The outcome are diffrents, some models tend to have stabilize accurace % other fluctuate depends on models and type of string vectorizing.
However the best results are Random Forest with unigrams and deleted long tails (occurances > 3): 79,2%

codes_bachelor_thesis's People

Contributors

mateuszkierznowski 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.