PHP Class Documer\Documer

ファイルを表示 Open project: kbariotis/documer

Public Properties

Property Type Description
$storage Storage Adapter

Public Methods

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

Private Methods

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

Method Details

__construct() public method

public __construct ( $storage )

getStorage() public method

public getStorage ( ) : Documer\Storage\Adapter
return Documer\Storage\Adapter

getWordicity() public method

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

guess() public method

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

is() public method

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

train() public method

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