Interface cebe\jssearch\TokenizerInterface

Implemented bycebe\jssearch\tokenizer\StandardTokenizer

Interface for all Tokenizers.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
tokenize() Tokenizes a string and returns an array of the following format: cebe\jssearch\TokenizerInterface
tokenizeJs() Returns a javascript equivalent of tokenize() that will be used on client side to tokenize the search query. cebe\jssearch\TokenizerInterface

Method Details

tokenize() public method

Tokenizes a string and returns an array of the following format:

[['word', 2], ['other', 1]]

where the first part is the token string and the second is a weight value.

array tokenize$string )
$string string

The string to tokenize

tokenizeJs() public method

Returns a javascript equivalent of tokenize() that will be used on client side to tokenize the search query.

string tokenizeJs( )