Code Monkey home page Code Monkey logo

nlp-classifier's Introduction

NLP Classifier for YouTube Comments

Introduction

This project focuses on building a Natural Language Processing (NLP) classifier to distinguish between spam and non-spam (ham) comments on YouTube videos. It utilizes Python libraries like Pandas, NLTK, and scikit-learn to preprocess text data and apply machine learning for classification. recognizing spam or ham comments on YouTubeInstallation

To run this project, follow these steps:

1- Clone the repository. 2- Install the required Python packages: pip install pandas numpy nltk sklearn plotly 3- Download the necessary NLTK data: import nltk nltk.download('wordnet') nltk.download('omw-1.4')

Dataset

The dataset used is 'Youtube02-KatyPerry.csv', containing YouTube comments with labels for spam and ham. The dataset is preprocessed for NLP tasks, including text cleaning, tokenization, removal of stopwords, stemming, and lemmatization.

Feature Extraction

The CountVectorizer from scikit-learn is used to convert text data into a matrix of token counts. Then, Tf-idf Transformer is applied to reflect the importance of a term in the document and the entire corpus.

Model Training and Evaluation

A Multinomial Naive Bayes classifier is trained on the processed dataset. The model's performance is evaluated using cross-validation and metrics like accuracy, confusion matrix, and classification report.

nlp-classifier's People

Contributors

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