PHP 클래스 Elastica\Suggest\Phrase

상속: extends AbstractSuggest
파일 보기 프로젝트 열기: ruflin/elastica 1 사용 예제들

공개 메소드들

메소드 설명
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 ( )