Function LangTokeniser_EN->word_list_to_word_ngrams
Definitions
sources/lang_tokeniser_EN.php
- Convert a simple word list into a list of ngrams, taking into account we want to do sequencing.
- Visibility: protected
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| &$word_ngrams | array | Yes | No | required parameter | N/A | N/A | Write word ngrams into here (along with a boolean to indicate whether they are a boolean ngram) |
| $word_list | array | No | No | required parameter | N/A | N/A | List of words |
| $max_ngram_size | integer | No | No | required parameter | N/A | N/A | The maximum number of ngrams (typically words) to sequence together |
Preview
Code (PHP)
/**
* Convert a simple word list into a list of ngrams, taking into account we want to do sequencing.
*
* @param array $word_ngrams Write word ngrams into here (along with a boolean to indicate whether they are a boolean ngram)
* @param array $word_list List of words
* @param integer $max_ngram_size The maximum number of ngrams (typically words) to sequence together
*/
protected function word_list_to_word_ngrams(array &$word_ngrams, array $word_list, int $max_ngram_size)
* Convert a simple word list into a list of ngrams, taking into account we want to do sequencing.
*
* @param array $word_ngrams Write word ngrams into here (along with a boolean to indicate whether they are a boolean ngram)
* @param array $word_list List of words
* @param integer $max_ngram_size The maximum number of ngrams (typically words) to sequence together
*/
protected function word_list_to_word_ngrams(array &$word_ngrams, array $word_list, int $max_ngram_size)

