PHP Класс Documer\Documer

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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

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

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

public __construct ( $storage )

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

public getStorage ( ) : Documer\Storage\Adapter
Результат Documer\Storage\Adapter

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

public getWordicity ( $wordTotalCount, $wordProbability, $wordInverseProbability )

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

* This is the guessing method, which uses Bayes Theorem to calculate probabilities
public guess ( $text )

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

Check if text is of the given label
public is ( $label, $text )
$label
$text

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

This is our training method, that parses the text and push the keywords to DB
public train ( $label, $text )
$label
$text

Описание свойств

$storage публичное свойство

Storage Adapter
public $storage