프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$storage | Storage Adapter |
메소드 | 설명 | |
---|---|---|
__construct ( $storage ) | ||
getStorage ( ) : Documer\Storage\Adapter | ||
getWordicity ( $wordTotalCount, $wordProbability, $wordInverseProbability ) | ||
guess ( $text ) | * This is the guessing method, which uses Bayes Theorem to calculate probabilities | |
is ( $label, $text ) | Check if text is of the given label | |
train ( $label, $text ) | This is our training method, that parses the text and push the keywords to DB |
메소드 | 설명 | |
---|---|---|
parse ( $text ) : array | We need to parse the text from some sort of tokenization | |
startsWithUppercase ( $str ) | This will return if a word is starting with an Uppercase letter, with UTF-8 Support |
public getWordicity ( $wordTotalCount, $wordProbability, $wordInverseProbability ) |
public guess ( $text ) |
public train ( $label, $text ) | ||
$label | ||
$text |