dinever / antispam Goto Github PK
View Code? Open in Web Editor NEWDead simple bayesian anti-spam classifier written in Python.
Home Page: https://antispam.readthedocs.org
Dead simple bayesian anti-spam classifier written in Python.
Home Page: https://antispam.readthedocs.org
Is there a possibility to add more than 3 arguments?
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)
d.save()
File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/__init__.py", line 180, in dump
fp.write(chunk)
TypeError: a bytes-like object is required, not 'str'
When using custom model with non English phrases (exactly Polish words with accents) I had problems with correct classifying texts using is_spam().
As a workaround I've used accents remover during train and checking( code: https://gist.github.com/AdoHaha/a76157c6de5155bf6b0adc77988724d9 ) which works great.
So, could you add normalizing parameter into code or fix accents somehow?
Hey, you generate the model as .dat but in your source code you use .json and do not provide Load function
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.