PHP Class Documer\Documer

Afficher le fichier Open project: kbariotis/documer

Méthodes publiques

Свойство Type Description
$storage Storage Adapter

Méthodes publiques

Méthode 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

Private Methods

Méthode 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

Method Details

__construct() public méthode

public __construct ( $storage )

getStorage() public méthode

public getStorage ( ) : Documer\Storage\Adapter
Résultat Documer\Storage\Adapter

getWordicity() public méthode

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

guess() public méthode

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

is() public méthode

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

train() public méthode

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

Property Details

$storage public_oe property

Storage Adapter
public $storage