PHPackages                             bgruszka/phpantispam - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bgruszka/phpantispam

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bgruszka/phpantispam
====================

Bayesian spam recognition library

v0.2.1(9y ago)278436[4 issues](https://github.com/bgruszka/PHPAntiSpam/issues)[3 PRs](https://github.com/bgruszka/PHPAntiSpam/pulls)MITPHP

Since Apr 3Pushed 3y ago2 watchersCompare

[ Source](https://github.com/bgruszka/PHPAntiSpam)[ Packagist](https://packagist.org/packages/bgruszka/phpantispam)[ RSS](/packages/bgruszka-phpantispam/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (9)Used By (0)

PHPAntiSpam
===========

[](#phpantispam)

[![Build Status](https://camo.githubusercontent.com/9ca950886571de2d943bab9789bcf4940c558f0277a9ac27000c555d26b7a842/68747470733a2f2f7472617669732d63692e6f72672f62677275737a6b612f504850416e74695370616d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bgruszka/PHPAntiSpam)[![Code Climate](https://camo.githubusercontent.com/a39f5e4363044d12be74b78f1c93556fb710d9302d8f4b4725f5f2b76c3b148c/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f62677275737a6b612f504850416e74695370616d2f6261646765732f6770612e737667)](https://codeclimate.com/github/bgruszka/PHPAntiSpam)

PHPAntiSpam is a library that recognize if documents / messages / texts are spam or not. The library use statistical analysis.
------------------------------------------------------------------------------------------------------------------------------

[](#phpantispam-is-a-library-that-recognize-if-documents--messages--texts-are-spam-or-not-the-library-use-statistical-analysis)

Explanation in 4 steps:
-----------------------

[](#explanation-in-4-steps)

- Create tokenizer
- Create corpus (with lexemes) from historical messages
- Choose method to use in classification
- Classify message

Implemented methods:
--------------------

[](#implemented-methods)

- Paul Graham method
- Brian Burton method
- Robinson Geometric Mean Test method
- Fisher-Robinson's Inverse Chi-Square Test method

Installation
------------

[](#installation)

`composer require bgruszka/phpantispam "^0.2"`

Examples
--------

[](#examples)

```
