Property | Type | Description | |
---|---|---|---|
$storage | Storage Adapter |
Method | Description | |
---|---|---|
__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 |
Method | Description | |
---|---|---|
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 getStorage ( ) : Documer\Storage\Adapter | ||
return | Documer\Storage\Adapter |
public getWordicity ( $wordTotalCount, $wordProbability, $wordInverseProbability ) |
public guess ( $text ) |
public train ( $label, $text ) | ||
$label | ||
$text |