mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Congratulations, no errors. When the functions tables are rebuild
you will see that pspell is now in the CVS tree. Currently its (unknown). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@28319 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
d7bdfb74b2
commit
c63fbda7ae
1 changed files with 55 additions and 48 deletions
|
@ -1,5 +1,5 @@
|
|||
<reference id="ref.pspell">
|
||||
<title>Pspell functions</title>
|
||||
<title>Pspell Functions</title>
|
||||
<titleabbrev>Pspell</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
|
@ -13,7 +13,7 @@
|
|||
</simpara>
|
||||
</partintro>
|
||||
|
||||
<refentry id="function.pspell_new">
|
||||
<refentry id="function.pspell-new">
|
||||
<refnamediv>
|
||||
<refname>pspell_new</refname>
|
||||
<refpurpose>Load a new dictionary</refpurpose>
|
||||
|
@ -44,33 +44,36 @@
|
|||
<simpara>
|
||||
<function>Pspell_new</function> opens up a new dictionary and
|
||||
returns the dictionary link identifier for use in other pspell
|
||||
functions.</simpara>
|
||||
functions.
|
||||
</simpara>
|
||||
<para>
|
||||
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:<ulink
|
||||
url="&url.pspell;">&url.pspell;</ulink>.
|
||||
</para>
|
||||
<para>
|
||||
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:<ulink url="&url.pspell;">&url.pspell;</ulink>.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Pspell_new</function></title>
|
||||
<programlisting role="php">
|
||||
$pspell_link = pspell_new("english");
|
||||
$pspell_link = pspell_new ("english");
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.pspell_mode">
|
||||
<refentry id="function.pspell-mode">
|
||||
<refnamediv>
|
||||
<refname>pspell_mode</refname>
|
||||
<refpurpose>Change spellchecking mode</refpurpose>
|
||||
|
@ -85,9 +88,9 @@ $pspell_link = pspell_new("english");
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<simpara>
|
||||
<function>pspell_mode</function> changes the spellchecking mode.
|
||||
</simpara>
|
||||
<para>There are three modes available:
|
||||
<function>Pspell_mode</function> changes the spellchecking mode.
|
||||
</simpara>
|
||||
<para>There are three modes available:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
@ -109,12 +112,12 @@ $pspell_link = pspell_new("english");
|
|||
<para>
|
||||
<example>
|
||||
<title><function>Pspell_mode</function></title>
|
||||
<programlisting>
|
||||
$pspell_link = pspell_new("english");
|
||||
pspell_mode(PSPELL_FAST);
|
||||
<programlisting role="php">
|
||||
$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");
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
|
@ -122,10 +125,12 @@ if(!pspell_check ($pspell_link, "testt")){
|
|||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.pspell_runtogether">
|
||||
<refentry id="function.pspell-runtogether">
|
||||
<refnamediv>
|
||||
<refname>pspell_runtogether</refname>
|
||||
<refpurpose>Consider run-together words as legal compounds</refpurpose>
|
||||
<refpurpose>
|
||||
Consider run-together words as legal compounds
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
@ -137,20 +142,22 @@ if(!pspell_check ($pspell_link, "testt")){
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<simpara>
|
||||
<function>pspell_runtogether</function> 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> 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
|
||||
<function>pspell_check</function>;
|
||||
<function>pspell_suggest</function> will still return
|
||||
suggestions, and they are not affected by the calls to
|
||||
<function>php_runtogether</function>.
|
||||
</simpara>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Pspell_runtogether</function></title>
|
||||
<programlisting>
|
||||
$pspell_link = pspell_new("english");
|
||||
pspell_runtogether(true);
|
||||
echo pspell_runtogether($pspell_link, "thecat") ? "correct" : "wrong";
|
||||
<programlisting role="php">
|
||||
$pspell_link = pspell_new ("english");
|
||||
pspell_runtogether (true);
|
||||
echo pspell_runtogether ($pspell_link, "thecat") ? "correct" : "wrong";
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
@ -172,18 +179,18 @@ echo pspell_runtogether($pspell_link, "thecat") ? "correct" : "wrong";
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<simpara>
|
||||
<function>pspell_check</function> checks the spelling of a word
|
||||
<function>Pspell_check</function> checks the spelling of a word
|
||||
and returns true if the spelling is correct, false if not.
|
||||
</simpara>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Pspell_check</function></title>
|
||||
<programlisting>
|
||||
$pspell_link = pspell_new("english");
|
||||
<programlisting role="php">
|
||||
$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";
|
||||
}
|
||||
</programlisting>
|
||||
|
@ -214,12 +221,12 @@ if(pspell_check($pspell_link, "testt")){
|
|||
<example>
|
||||
<title><function>Pspell_suggest</function></title>
|
||||
<programlisting role="php">
|
||||
$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>";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue