PHP Класс Elastica\Suggest\Phrase

Наследование: extends AbstractSuggest
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
addCandidateGenerator ( Elastica\Suggest\CandidateGenerator\AbstractCandidateGenerator $generator )
setAnalyzer ( string $analyzer )
setConfidence ( float $confidence ) Set the factor applied to the input phrases score to be used as a threshold for other suggestion candidates.
setGramSize ( integer $size ) Set the max size of the n-grams (shingles) in the field.
setHighlight ( string $preTag, string $postTag ) Set suggestion highlighting.
setLaplaceSmoothing ( float $alpha = 0.5 )
setLinearInterpolationSmoothing ( float $trigramLambda, float $bigramLambda, float $unigramLambda )
setMaxErrors ( float $max ) Set the maximum percentage of the terms considered to be misspellings in order to form a correction.
setRealWordErrorLikelihood ( float $likelihood ) Set the likelihood of a term being misspelled even if the term exists in the dictionary.
setSeparator ( string $separator )
setSmoothingModel ( string $model, array $params )
setStupidBackoffSmoothing ( float $discount = 0.4 )
toArray ( )

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

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

public addCandidateGenerator ( Elastica\Suggest\CandidateGenerator\AbstractCandidateGenerator $generator )
$generator Elastica\Suggest\CandidateGenerator\AbstractCandidateGenerator

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

public setAnalyzer ( string $analyzer )
$analyzer string

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

Only candidates which score higher than this threshold will be included in the result.
public setConfidence ( float $confidence )
$confidence float Defaults to 1.0.

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

Set the max size of the n-grams (shingles) in the field.
public setGramSize ( integer $size )
$size integer

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

Set suggestion highlighting.
public setHighlight ( string $preTag, string $postTag )
$preTag string
$postTag string

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

public setLaplaceSmoothing ( float $alpha = 0.5 )
$alpha float

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

public setLinearInterpolationSmoothing ( float $trigramLambda, float $bigramLambda, float $unigramLambda )
$trigramLambda float
$bigramLambda float
$unigramLambda float

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

Set the maximum percentage of the terms considered to be misspellings in order to form a correction.
public setMaxErrors ( float $max )
$max float

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

Set the likelihood of a term being misspelled even if the term exists in the dictionary.
public setRealWordErrorLikelihood ( float $likelihood )
$likelihood float Defaults to 0.95, meaning 5% of the words are misspelled.

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

public setSeparator ( string $separator )
$separator string

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

public setSmoothingModel ( string $model, array $params )
$model string the name of the smoothing model
$params array

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

public setStupidBackoffSmoothing ( float $discount = 0.4 )
$discount float

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

public toArray ( )