GithubHelp home page GithubHelp logo

vasvasv / sms-spam-detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from amaaniqbal/sms-spam-detection

1.0 0.0 0.0 246 KB

Spam Detection using GitHub actions

License: MIT License

Python 76.64% Dockerfile 20.38% Shell 2.98%

sms-spam-detection's Introduction

SMS Spam Detection

This repository teaches to code an SMS Spam Classifier using Multi-Layer Perceptron. Here, scikit-learn pipelines are used for pipelining the training and testing task on the training and testing sets respectively. The codes for the same are avaialble in main.py.

A high level view of the system is as follows:

  • Import libraries
  • Import SMS Spam Collection dataset
  • Define function for removing punctuations and stopwords
  • Split training and testing set
  • Create pipeline
    • Construct Bag of Words
    • Compute tf-idf scores
    • Instantiate MLP Classifier
  • Fit the pipeline on the training set
  • Test the pipeline on the test set
  • Print the results

Action Usage

To use this action in your repository, create a file like .github/workflows/spam_detect.yml with the following content:

name: Spam Detection Action
on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: SMS Spam Detection Action
      uses: amaaniqbal/[email protected]
      with:
        # Message to be checked for spam
        message: "input message to be tested goes here..."

Script Usage

Run the file main.py without any command line arguments to view the classifier performance on the available test set. In order to test on the custom input, run the following command:

python main.py "Custom input string goes here"

In the command, custom input string can also be specified without quotes.

Contributing

Please feel free to create an issue if you find a bug or send a pull request if you wish to improve the existing code/add a new feature.

sms-spam-detection's People

Contributors

amaaniqbal avatar vasvasv avatar

Stargazers

 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.