Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

antispam

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antispam

Bayesian anti-spam classifier written in Python.

  • 0.1
  • PyPI
  • Socket score

Maintainers
1

AntiSpam

downloads version supported license

Bayesian anti-spam classifier written in Python.

PyPI: pypi.python.org/pypi/antispam

Installation

pip install antispam

Usage

Use the built-in training model provided by antispam:

import antispam

antispam.score("Cheap shoes for sale at DSW shoe store!")
# => 0.9657724517163143

antispam.isspam("Cheap shoes for sale at DSW shoe store!")
# => True

antispam.score("Hi mark could you please send me a copy of your machine learning homework? thanks")
# => 0.0008064840568731558

antispam.score("Hi mark could you please send me a copy of your machine learning homework? thanks")
# => False

Train your own modle.

import antispam

d = antispam.Detector("my_model.dat")

d.train("Super cheap octocats for sale at GitHub.", True)
d.train("Hi John, could you please come to my office by 3pm? Ding", False)

msg1 = "Cheap shoes for sale at DSW shoe store!"
d.score(msg1)
# => 0.9999947825633266

d.is_spam(msg1)
# => True

msg2 = "Hi mark could you please send me a copy of your machine learning homework? thanks"
d.score(msg2)
# => 4.021280114849398e-08

d.is_spam(msg2)
# => False

##License

MIT Licenses

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc