PHP Класс Jyxo\SpamFilter

Автор: Roman Řáha
Показать файл Открыть проект

Открытые методы

Метод Описание
isBabble ( string $text ) : boolean Returns if the text consists of repeating parts.
isBlack ( string $text ) : boolean Returns if the given text contains blacklisted words.
isLinkSpam ( string $text ) : boolean Returns if the text contains too many links.
isSpam ( string $text ) : boolean Checks if the given text is spam.
setBlackList ( array $blackList ) : self Sets word blacklist.
setIgnoreWords ( array $ignoreWords ) : self Sets ignored word list.

Описание методов

isBabble() публичный Метод

Returns true if the number of at least three times repeated words is greater than 3/4 of all words.
public isBabble ( string $text ) : boolean
$text string Checked text
Результат boolean

isBlack() публичный Метод

Returns if the given text contains blacklisted words.
public isBlack ( string $text ) : boolean
$text string Checked text
Результат boolean

isLinkSpam() публичный Метод

Returns if the text contains too many links.
public isLinkSpam ( string $text ) : boolean
$text string Checked text
Результат boolean

isSpam() публичный Метод

Checks if the given text is spam.
public isSpam ( string $text ) : boolean
$text string Checked text
Результат boolean

setBlackList() публичный Метод

Sets word blacklist.
public setBlackList ( array $blackList ) : self
$blackList array Words blacklist
Результат self

setIgnoreWords() публичный Метод

Sets ignored word list.
public setIgnoreWords ( array $ignoreWords ) : self
$ignoreWords array Ignored words list
Результат self