Interface cebe\jssearch\TokenizerInterface
Implemented by | cebe\jssearch\tokenizer\StandardTokenizer |
---|
Interface for all Tokenizers.
Public Methods
Method | Description | Defined 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
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 |
Returns a javascript equivalent of tokenize() that will be used on client side to tokenize the search query.
string tokenizeJs( ) |