diff --git a/functions/pspell.xml b/functions/pspell.xml index 2665f87349..971f1c9592 100644 --- a/functions/pspell.xml +++ b/functions/pspell.xml @@ -1,5 +1,5 @@ - Pspell functions + Pspell Functions Pspell @@ -13,7 +13,7 @@ - + pspell_new Load a new dictionary @@ -44,33 +44,36 @@ Pspell_new opens up a new dictionary and returns the dictionary link identifier for use in other pspell - functions. + functions. + + + The language parameter is the language code which consists of the + two letter ISO 639 language code and an optional two letter ISO + 3166 country code after a dash or underscore. The spelling + parameter is the requested spelling for languages with more than + one spelling such as English. Known values are ``american'', + ``britsh'', and ``canadian''. The jargon parameter contains extra + information two distinguish two different words lists that have + the same language-tag and spelling. The encoding parameter is the + encoding that words are expected to be in. Valid values are + 'utf-8', 'iso8859-*', 'koi8-r', 'viscii', 'cp1252', 'machine + unsigned 16', 'machine unsigned 32'. This parameter is largely + untested, so be careful when using. For more information and + examples, check out inline manual pspell website:&url.pspell;. + - The language parameter is the language code which consists of the two - letter ISO 639 language code and an optional two letter ISO 3166 country - code after a dash or underscore. The spelling parameter is the requested - spelling for languages with more than one spelling such as English. Known - values are ``american'', ``britsh'', and ``canadian''. The jargon parameter - contains extra information two distinguish two different words lists that - have the same language-tag and spelling. The encoding parameter is the - encoding that words are expected to be in. Valid values are 'utf-8', - 'iso8859-*', 'koi8-r', 'viscii', 'cp1252', 'machine unsigned 16', - 'machine unsigned 32'. This parameter is largely untested, so be careful when - using. For more information and examples, check out inline manual pspell - website:&url.pspell;. - - <function>Pspell_new</function> -$pspell_link = pspell_new("english"); +$pspell_link = pspell_new ("english"); - + pspell_mode Change spellchecking mode @@ -85,9 +88,9 @@ $pspell_link = pspell_new("english"); - pspell_mode changes the spellchecking mode. - - There are three modes available: + Pspell_mode changes the spellchecking mode. + + There are three modes available: @@ -109,12 +112,12 @@ $pspell_link = pspell_new("english"); <function>Pspell_mode</function> - -$pspell_link = pspell_new("english"); -pspell_mode(PSPELL_FAST); + +$pspell_link = pspell_new ("english"); +pspell_mode (PSPELL_FAST); -if(!pspell_check ($pspell_link, "testt")){ - $suggestions = pspell_suggest($pspell_link, "testt"); +if (!pspell_check ($pspell_link, "testt")) { + $suggestions = pspell_suggest ($pspell_link, "testt"); } @@ -122,10 +125,12 @@ if(!pspell_check ($pspell_link, "testt")){ - + pspell_runtogether - Consider run-together words as legal compounds + + Consider run-together words as legal compounds + Description @@ -137,20 +142,22 @@ if(!pspell_check ($pspell_link, "testt")){ - pspell_runtogether Consider run-together words as - legal compounds. That is, "thecat" will be a legal compound, athough - there should be a space between the two words. Changing this setting - only affects the results returned by pspell_check(); pspell_suggest() - will still return suggestions, and they are not affected by the calls - to php_runtogether(). + Pspell_runtogether Consider run-together + words as legal compounds. That is, "thecat" will be a legal + compound, athough there should be a space between the two + words. Changing this setting only affects the results returned by + pspell_check; + pspell_suggest will still return + suggestions, and they are not affected by the calls to + php_runtogether. <function>Pspell_runtogether</function> - -$pspell_link = pspell_new("english"); -pspell_runtogether(true); -echo pspell_runtogether($pspell_link, "thecat") ? "correct" : "wrong"; + +$pspell_link = pspell_new ("english"); +pspell_runtogether (true); +echo pspell_runtogether ($pspell_link, "thecat") ? "correct" : "wrong"; @@ -172,18 +179,18 @@ echo pspell_runtogether($pspell_link, "thecat") ? "correct" : "wrong"; - pspell_check checks the spelling of a word + Pspell_check checks the spelling of a word and returns true if the spelling is correct, false if not. <function>Pspell_check</function> - -$pspell_link = pspell_new("english"); + +$pspell_link = pspell_new ("english"); -if(pspell_check($pspell_link, "testt")){ +if (pspell_check ($pspell_link, "testt")) { echo "This is a valid spelling"; -}else{ +} else { echo "Sorry, wrong spelling"; } @@ -214,12 +221,12 @@ if(pspell_check($pspell_link, "testt")){ <function>Pspell_suggest</function> -$pspell_link = pspell_new("english"); +$pspell_link = pspell_new ("english"); -if(!pspell_check ($pspell_link, "testt")){ - $suggestions = pspell_suggest($pspell_link, "testt"); +if (!pspell_check ($pspell_link, "testt")){ + $suggestions = pspell_suggest ($pspell_link, "testt"); - for($i=0; $i < count ($suggestions); $i++){ + for ($i=0; $i < count ($suggestions); $i++) { echo "Possible spelling: " . $suggestions[$i] . "<br>"; } }