JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 146
  • Score
    100M100P100Q82481F
  • License ISC

Small package to check spam text and messages

Package Exports

  • spam-detection

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (spam-detection) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

spam-detection

Small package based on Naive Bayes classifier to classify messages as spam or ham.

Install

npm install spam-detection

Usage

const spamcheck = require('spam-detection');

const ans = spamcheck.detect('hello how are you') // invoke detect method

console.log(ans); // ham

const result = spamcheck.getResult('hello how are you')

console.log(result); // [ { label: 'ham', value: 0.01866475233309404 },
                        { label: 'spam', value: 0.0030509691313711416 } ]

License

ISC