Here also.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@21706 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Egon Schmid 2000-03-18 17:33:06 +00:00
parent 0d1a6ff2f2
commit 053d64e7f7

View file

@ -1,20 +1,22 @@
<reference id="ref.aspell">
<title>Aspell functions</title>
<titleabbrev>aspell</titleabbrev>
<titleabbrev>Aspell</titleabbrev>
<partintro>
<simpara>
The <function>aspell</function> functions allows you to check the
spelling on a word and offer suggestions.</simpara>
spelling on a word and offer suggestions.
</simpara>
<simpara>
You need the aspell library, available from: <ulink url="http://metalab.unc.edu/kevina/aspell/">http://metalab.unc.edu/kevina/aspell/</ulink></simpara>
You need the aspell library, available from: <ulink
url="&url.aspell;">&url.aspell;</ulink>.
</simpara>
</partintro>
<refentry id="function.aspell-new">
<refnamediv>
<refname>aspell_new</refname>
<refpurpose>load a new dictionary</refpurpose>
<refpurpose>Load a new dictionary</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -24,24 +26,24 @@
<paramdef>string <parameter>personal</parameter></paramdef>
</funcsynopsis>
<simpara>
<function>aspell_new</function> opens up a new dictionary and
<function>Aspell_new</function> opens up a new dictionary and
returns the dictionary link identifier for use in other aspell
functions.</simpara>
<para>
<example>
<title>aspell_new</title>
<programlisting>
$aspell_link=aspell_new("english");
<title><function>Aspell_new</function></title>
<programlisting role="php">
$aspell_link=aspell_new ("english");
</programlisting>
</example></para>
</example>
</para>
</refsect1>
</refentry>
<refentry id="function.aspell-check">
<refnamediv>
<refname>aspell_check</refname>
<refpurpose>check a word</refpurpose>
<refpurpose>Check a word</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -51,29 +53,31 @@ $aspell_link=aspell_new("english");
<paramdef>string <parameter>word</parameter></paramdef>
</funcsynopsis>
<simpara>
<function>aspell_check</function> checks the spelling of a word
and returns true if the spelling is correct, false if not.</simpara>
<function>Aspell_check</function> checks the spelling of a word
and returns true if the spelling is correct, false if not.
</simpara>
<para>
<example>
<title>aspell_check</title>
<title><function>Aspell_check</function></title>
<programlisting>
$aspell_link=aspell_new("english");
if (aspell_check($aspell_link,"testt")) {
$aspell_link=aspell_new ("english");
if (aspell_check ($aspell_link,"testt")) {
echo "This is a valid spelling";
} else {
echo "Sorry, wrong spelling";
}
</programlisting>
</example></para>
</example>
</para>
</refsect1>
</refentry>
<refentry id="function.aspell-check-raw">
<refnamediv>
<refname>aspell_check-raw</refname>
<refpurpose>check a word without changing its case or trying to
trim it</refpurpose>
<refpurpose>
Check a word without changing its case or trying to trim it
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -83,29 +87,30 @@ if (aspell_check($aspell_link,"testt")) {
<paramdef>string <parameter>word</parameter></paramdef>
</funcsynopsis>
<simpara>
<function>aspell_check_raw</function> checks the spelling of a
<function>Aspell_check_raw</function> checks the spelling of a
word, without changing its case or trying to trim it in any way
and returns true if the spelling is correct, false if not.</simpara>
and returns true if the spelling is correct, false if not.
</simpara>
<para>
<example>
<title>aspell_check_raw</title>
<programlisting>
$aspell_link=aspell_new("english");
if (aspell_check_raw($aspell_link,"testt")) {
<title><function>Aspell_check_raw</function></title>
<programlisting role="php">
$aspell_link=aspell_new ("english");
if (aspell_check_raw ($aspell_link, "test")) {
echo "This is a valid spelling";
} else {
echo "Sorry, wrong spelling";
}
</programlisting>
</example></para>
</example>
</para>
</refsect1>
</refentry>
<refentry id="function.aspell-suggest">
<refnamediv>
<refname>aspell_suggest</refname>
<refpurpose>suggest spellings of a word</refpurpose>
<refpurpose>Suggest spellings of a word</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -115,27 +120,28 @@ if (aspell_check_raw($aspell_link,"testt")) {
<paramdef>string <parameter>word</parameter></paramdef>
</funcsynopsis>
<simpara>
<function>aspell_suggest</function> returns an array of possible
spellings for the given word.</simpara>
<function>Aspell_suggest</function> returns an array of possible
spellings for the given word.
</simpara>
<para>
<example>
<title>aspell_suggest</title>
<programlisting>
$aspell_link=aspell_new("english");
<title><function>Aspell_suggest</function></title>
<programlisting role="php">
$aspell_link=aspell_new ("english");
if (!aspell_check($aspell_link,"testt")) {
$suggestions=aspell_suggest($aspell_link,"testt");
if (!aspell_check ($aspell_link, "test")) {
$suggestions=aspell_suggest ($aspell_link, "test");
for($i=0; $i &lt; count($suggestions); $i++) {
echo "Possible spelling: " . $suggestions[$i] . "&lt;br>";
for ($i=0; $i &lt; count ($suggestions); $i++) {
echo "Possible spelling: " . $suggestions[$i] . "&lt;br>";
}
}
</programlisting>
</example></para>
</example>
</para>
</refsect1>
</refentry>
</reference>
<!-- Keep this comment at the end of the file
@ -148,7 +154,7 @@ sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../manual.ced"
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil