PHP 클래스 Jyxo\SpamFilter

저자: Roman Řáha
파일 보기 프로젝트 열기: jyxo/php

공개 메소드들

메소드 설명
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