PHP Classes

Bayesian Spam Filter: Detect spam in text using Bayesian techniques

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 74%Total: 4,958 All time: 544 This week: 45Up
Version License PHP version Categories
bayesianspamfilter 1.1BSD License4.0Text processing, Artificial intelligence
Description 

Author

This class can be used to detect spam in text messages using Bayesian techniques.

It analyzes the text words in terms of n-grams in a way that is idiom independent.

It can be trained to progressively distinguish what is spam and what is not spam by detecting patterns in training samples. Training data is stored in a MySQL database.

Innovation Award
PHP Programming Innovation award nominee
December 2007
Number 3
Determining whether a message is spam or not, is a subjective task.

Using Bayesian techniques it is possible to make a computer program learn what can be spam and what may not be spam.

A program may be trained using sample messages and telling it which are spam. Once the program is well trained, it may start guessing what is spam all by itself.

This package implements solution written completely in PHP that uses Bayesian techniques to detect spam text messages.

Manuel Lemos
Picture of Cesar D. Rodas
  Performance   Level  
Name: Cesar D. Rodas is available for providing paid consulting. Contact Cesar D. Rodas .
Classes: 38 packages by
Country: Paraguay Paraguay
Age: 37
All time rank: 71 in Paraguay Paraguay
Week rank: 47 Down1 in Paraguay Paraguay Equal
Innovation award
Innovation award
Nominee: 25x

Winner: 5x

  Files folder image Files (9)  
File Role Description
Files folder imageexample (5 files)
Plain text file ngram.php Class N-gram class
Plain text file spam.php Class Spam detection class
Accessible without login HTML file spamdetection.html Doc. General information about this class
Plain text file trainer.php Class Spam trainer class

  Files folder image Files (9)  /  example  
File Role Description
  Accessible without login Plain text file test.php Test Testing script
  Accessible without login Plain text file base.sql Data Example of Spams and mysql table to save the knowledge
  Accessible without login Plain text file config.php Conf. Example
  Accessible without login Plain text file example.php Example Classification example
  Accessible without login Plain text file example_trainer.php Example Example of how to traine the spam database

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,958
This week:0
All time:544
This week:45Up
 User Ratings  
 
 All time
Utility:86%StarStarStarStarStar
Consistency:77%StarStarStarStar
Documentation:75%StarStarStarStar
Examples:80%StarStarStarStarStar
Tests:78%StarStarStarStar
Videos:-
Overall:74%StarStarStarStar
Rank:99