Aspell_new: Load a new dictionary.
Aspell_check: Check a word.
Aspell_check-raw: Check a word, even if misspelled, does not change or correct.
Aspell_suggest: Check a word and provide spelling advice.
Aspell_new
Load a new dictionary.
Syntax: int aspell_new (string master, string personal);
return value: Integer
Function type: Data processing
Content description This function loads a new dictionary and assigns a new identity value (integer) for use in the program.
Use the example $aspell _link=aspell_new ("中文版");
Aspell_check
Check a word.
Syntax: boolean aspell_check (int dictionary_link, string word);
Return Value: Boolean value
Function type: Data processing
Content Description This function checks the spelling of the word. Returns true if the spelling is correct, or false if incorrect.
Usage examples
The following are the referenced contents: $aspell _link=aspell_new ("中文版"); if (Aspell_check ($aspell _link, "Testt")) { echo "This is a valid spelling"; } else { echo "Sorry, wrong spelling"; } Aspell_check-raw |
Check a word, even if misspelled, does not change or correct.
Syntax: boolean aspell_check_raw (int dictionary_link, string word);
Return Value: Boolean value
Function type: Data processing
Content Description
This function checks the spelling of the word. Returns true if the spelling is correct, or false if incorrect. This function does not change or fix the user's spelling.
Usage examples
The following are the referenced contents: $aspell _link=aspell_new ("中文版"); if (Aspell_check_raw ($aspell _link, "Testt")) { echo "This is a valid spelling"; } else { echo "Sorry, wrong spelling"; } Aspell_suggest |
Check a word and provide spelling suggestions.
Syntax: array aspell_suggest (int dictionary_link, string word);
return value: Array
Function type: Data processing
Content Description
This function checks the spelling of the word. and give possible spellings and correct suggestions to the array type to return the result.
Usage examples
The following are the referenced contents:
? $aspell _link=aspell_new ("中文版"); if (!aspell_check ($aspell _link, "Testt")) { $suggestions =aspell_suggest ($aspell _link, "Testt"); For ($i =0 $i < count ($suggestions); $i + +) { echo "Possible spelling:". $suggestions [$i]. "<br>"; } } ?>
|