Coder Social home page Coder Social logo

m4cit / slangid2 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 318.11 MB

Slang Identification via Machine Learning using sklearn.

License: MIT License

Python 100.00%
computational-linguistics machine-learning natural-language-processing python sklearn slang

slangid2's Introduction

What is slangID

In a nutshell: The slangID project tries to detect slang phrases. Something literally no one asked for...

You can train a selection of classifiers, and print out a test set of phrases with the DEMO button. Or you can type a phrase and see what type it is identified as. All the models are pre-trained, but you can re-train if needed.

Challenges

Due to a lack of data, the results, regardless of the classifier used, are not impressive right now. Unknown words are also an issue since the dataset is tiny. Slang phrases with normal words like 'sick' are not accounted for with a sentiment analysis either.

Performance

In total, there are five classifiers you can choose from:

  • Linear SVM (SVC with linear Kernel)
  • Decision Tree
  • Gaussian Naive Bayes
  • Multinomial Naive Bayes
  • Logistic Regression

Currently the best performer is the Gaussian Naive Bayes model with an F1 score of ~65.70%

How to run slangID2

  1. Install Python 3.9 (3.8 and 3.10 is probably fine too, I used 3.9.12).
  2. Install the required packages by running pip install -r requirements.txt in your shell of choice. Make sure you are in the project directory.
  3. And then run python slangID2_Windows.py or python3 slangID2_Linux.py (the difference between both versions is just the font size on some labels and buttons).

Note: It might take a while to load. Be patient.

Screenshot

slangID2.0

Source of the data

Most of the phrases come from archive.org's Twitter Stream of June 6th.

Recognition of Open Source use

  • scikit-learn
  • pandas

slangid2's People

Contributors

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