Function LangTokeniser_EN->phrase_to_word_list
Definitions
sources/lang_tokeniser_EN.php
- Convert a phrase to a list of words.
- Visibility: protected
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $phrase | string | No | No | required parameter | N/A | N/A | A phrase |
| &$total_word_tokens | ?integer | Yes | No | required parameter | N/A | N/A | Maintain a count of singular ngrams (word tokens in our case) in here (null: do not count) |
Returns
- List of words
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Convert a phrase to a list of words.
*
* @param string $phrase A phrase
* @param ?integer $total_word_tokens Maintain a count of singular ngrams (word tokens in our case) in here (null: do not count)
* @return array List of words
*/
protected function phrase_to_word_list(string $phrase, ?int &$total_word_tokens) : array
* Convert a phrase to a list of words.
*
* @param string $phrase A phrase
* @param ?integer $total_word_tokens Maintain a count of singular ngrams (word tokens in our case) in here (null: do not count)
* @return array List of words
*/
protected function phrase_to_word_list(string $phrase, ?int &$total_word_tokens) : array

