Pspell_new
(PHP4 CVS only)
Pspell_new---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; Load a new dictionary
Syntax: int pspell_new (String language [, string spelling [, String jargon [, string encoding [, int mode]]]
Description:
Pspell_new () opens a new dictionary and returns the dictionary link identifier to other Scrabble functions.
The parameter language is a language code, consisting of two-letter ISO 639 language code and a non-essential two-letter ISO 3166 country code.
Parameter spelling is the requested language spelling has more than one spelling, as in English there are ' Anglo ', ' Airways ' and ' Canadian '.
The parameter jargon contains additional information to differentiate the list of two different words with the same language and parameter spelling.
Parameter encoding is to encode the word, valid values are: ' Utf-8 ', ' iso8859-* ', ' koi8-r ', ' viscii ', ' cp1252 ', ' machine unsigned 16 ', ' Machine unsigned 32 '. Most of this parameter has not been tested, so be careful when you use it.
Parameter mode shows you how to use the spelling checker, and there are several ways to use it:
Pspell_fast-Fast Way (least recommended)
Pspell_normal-Standard approach (more recommended)
Pspell_bad_spellers-Slow Way (most recommended)
Pspell_run_together-The combination of words is considered to be a legitimate synthesis, meaning that "thecat" will be considered a legitimate synthesis, only that it should be separated from the word in two characters, but it will still be considered a legitimate synthesis. Changing this setting will only affect the results returned by Pspell_check (), but Pspell_suggest () will return the suggested spellings.
Parameter mode is a bit mask (bitmask) consisting of the above constants, and Pspell_fast, Pspell_normal, and Pspell_bad_spellers are independent of each other, so you can only select one of them.
For more information and examples, take a look at the online manuals on Pspell's website http://pspell.sourceforge.net/.
Example:
<?php
$pspell _link = pspell_new ("en", "" "," "," "," (pspell_fast| Pspell_run_together));
?>