Function __global->run_spellcheck__words

Definitions

sources/spelling.php

  • Run a spellcheck on some words.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$words array No No required parameter N/A N/A List of words
$lang ?ID_TEXT No No Null N/A N/A Language to check in (null: current language)
$skip_known_words_in_db boolean No No True N/A N/A Whether to avoid spellchecking known keywords etc
$provide_corrections boolean No No True N/A N/A Whether to provide corrections
$unicode_accepted boolean No No True N/A N/A Whether Unicode is accepted

Returns

  • A map of misspellings, lower case bad word => array of corrections (null: error)
  • Type: ?array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Run a spellcheck on some words.
 *
 * @param  array $words List of words
 * @param  ?ID_TEXT $lang Language to check in (null: current language)
 * @param  boolean $skip_known_words_in_db Whether to avoid spellchecking known keywords etc
 * @param  boolean $provide_corrections Whether to provide corrections
 * @param  boolean $unicode_accepted Whether Unicode is accepted
 * @return ?array A map of misspellings, lower case bad word => array of corrections (null: error)
 */

function run_spellcheck__words(array $words, ?string $lang = null, bool $skip_known_words_in_db = true, bool $provide_corrections = true, bool $unicode_accepted = true) : ?array