Code Monkey home page Code Monkey logo

akinbicer / turkish-compliment-classification-with-nlp Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 15 KB

This repository contains a Python script for training, evaluating, and deploying a Natural Language Processing (NLP) model for classifying compliments in Turkish language. The model is trained using the Multinomial Naive Bayes algorithm and is saved in ONNX and Joblib formats for deployment.

License: MIT License

Python 100.00%
nlp nlp-deep-learning nlp-machine-learning turkish-nlp classification classification-algorithm classification-model compliment-generator turkish-compliment-classification onnx

turkish-compliment-classification-with-nlp's Introduction

Turkish Compliment Classification with NLP

This repository contains a Python script for training, evaluating, and deploying a Natural Language Processing (NLP) model for classifying compliments in Turkish language. The model is trained using the Multinomial Naive Bayes algorithm and is saved in ONNX and Joblib formats for deployment.

Contents

  1. Introduction
  2. Requirements
  3. Usage
  4. Model Training

Introduction

The goal of this project is to build a machine learning model that can classify compliments as either "Male" (0) or "Female" (1) based on their content. The model uses TF-IDF vectorization for text data and is trained on a dataset of compliments in Turkish language.

Requirements

To run this project, you'll need the following dependencies:

  • Python 3.6+
  • pandas
  • joblib
  • numpy
  • skl2onnx
  • scikit-learn

You can install these dependencies using pip:

pip install pandas joblib numpy skl2onnx scikit-learn

Usage

  1. Clone this repository to your local machine:
git clone https://github.com/akinbicer/turkish-compliment-classification-with-nlp.git
  1. Navigate to the project directory:
cd turkish-compliment-classification-with-nlp
  1. Run the Python script to train and save the model:
python Complimenter.NLP.Classification.py
  1. After training, the model will be saved in both ONNX and Joblib formats in the Models directory.

Model Training

  • The script Complimenter.NLP.Classification.py handles data loading, preprocessing, model selection, hyperparameter tuning, training, evaluation, and saving the model.
  • The dataset is loaded from a CSV file (Turkish.csv) containing compliments and their corresponding labels (0 for Male, 1 for Female).
  • TF-IDF vectorization is used to convert text data into numerical features.
  • The Multinomial Naive Bayes algorithm is chosen as the classification model.
  • Hyperparameter tuning is performed using Grid Search with cross-validation.
  • Model evaluation metrics such as accuracy and classification report are displayed.

License

This project is distributed under the MIT license. Refer to the LICENSE file for more information.

Issues, Feature Requests or Support

Please use the New Issue button to submit issues, feature requests or support issues directly to me. You can also send an e-mail to [email protected].

turkish-compliment-classification-with-nlp's People

Contributors

akinbicer avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

jakajoko0

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.