1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.14 $ -->
<reference id="ref.aspell">
<title>Aspell</title>
<titleabbrev>aspell</titleabbrev>
<partintro>
<simpara>
Les fonctions Aspell vous permettent de vérifier l'orthographe d'un mot,
et d'offrir des suggestions de corrections. Plusieurs langues sont disponibles,
comme le français, l'anglais, l'allemand, le suédois ou le danois.
</simpara>
<note>
<simpara>
Aspell fonctionne avec de très vielles versions (jusqu'à la
version .27.* ou presque) de la librairie Aspell. Ce module, et ces versions
d'Aspell ne sont plus supportées. Si vous voulez exploiter des
capacités de vérifications orthographiques en PHP,
utilisez plutôt <link linkend="ref.pspell">pspell</link>.
Ce module utilise la librairie pspell qui fonctionne avec les
nouvelles versions de Aspell.
</simpara>
</note>
<simpara>
Vous avez besoin de la librairie Aspell, disponible à :
<ulink url="&url.aspell;">&url.aspell;</ulink>.
</simpara>
</partintro>
<refentry id="function.aspell-new">
<refnamediv>
<refname>aspell_new</refname>
<refpurpose>Charge un nouveau dictionnaire [Obsolète]</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>aspell_new</methodname>
<methodparam><type>string</type><parameter>master</parameter></methodparam>
<methodparam><type>string</type><parameter>personal</parameter></methodparam>
</methodsynopsis>
<simpara>
<function>aspell_new</function> ouvre un nouveau dictionaire, et
retourne un identifiant de dictionnaire pour utilisation ultérieure
dans les fonctions aspell. <function>aspell_new</function> retourne &false;
en cas d'erreur.
</simpara>
<para>
<example>
<title>Exemple avec <function>aspell_new</function></title>
<programlisting role="php">
<?php
$aspell_link = aspell_new("english");
?>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<refentry id="function.aspell-check">
<refnamediv>
<refname>aspell_check</refname>
<refpurpose>Vérifie un mot [Obsolète]</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>boolean</type><methodname>aspell_check</methodname>
<methodparam><type>resource</type><parameter>dictionary_link</parameter></methodparam>
<methodparam><type>string</type><parameter>word</parameter></methodparam>
</methodsynopsis>
<simpara>
<function>aspell_check</function> vérifie l'orthographe d'un mot
et retourne &true; si l'orthographe est correcte,
et &false; sinon.
</simpara>
<para>
<example>
<title>Exemple avec <function>aspell_check</function></title>
<programlisting role="php">
<?php
$aspell_link = aspell_new("english");
if (aspell_check($aspell_link,"testt")) {
echo "L'orthographe est correcte.";
} else {
echo "Désolé, l'orthographe est incorrecte.";
}
?>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<refentry id="function.aspell-check-raw">
<refnamediv>
<refname>aspell_check_raw</refname>
<refpurpose>
Vérifie un mot sans en changer la casse et sans essayer de supprimer
les espaces aux extrémités. [Obsolète]
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>boolean</type><methodname>aspell_check_raw</methodname>
<methodparam><type>resource</type><parameter>dictionary_link</parameter></methodparam>
<methodparam><type>string</type><parameter>word</parameter></methodparam>
</methodsynopsis>
<simpara>
<function>aspell_check_raw</function> vérifie l'orthographe
d'un mot sans en changer la casse, et sans essayer de supprimer les
espaces aux extrémités. Elle retourne &true;
si l'orthographe est bonne, et &false; sinon.
</simpara>
<para>
<example>
<title>Exemple avec <function>aspell_check_raw</function></title>
<programlisting role="php">
<?php
$aspell_link = aspell_new("french");
if (aspell_check_raw($aspell_link,"testt")) {
echo "L'orthographe est OK";
} else {
echo "Attention : faute d'orthographe";
}
?>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<refentry id="function.aspell-suggest">
<refnamediv>
<refname>aspell_suggest</refname>
<refpurpose>Suggère l'orthographe d'un mot [Obsolète]</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>aspell_suggest</methodname>
<methodparam><type>resource</type><parameter>dictionary_link</parameter></methodparam>
<methodparam><type>string</type><parameter>word</parameter></methodparam>
</methodsynopsis>
<simpara>
<function>aspell_suggest</function> retourne un tableau contenant
les orthographes possibles d'un mot mal formé.
</simpara>
<para>
<example>
<title>Exemple avec <function>aspell_suggest</function></title>
<programlisting role="php">
<?php
$aspell_link = aspell_new("french");
if (!aspell_check($aspell_link,"testt")) {
$suggestions=aspell_suggest($aspell_link,"testt");
for($i=0; $i < count($suggestions); $i++) {
echo "Orthographes envisageables : " . $suggestions[$i] . "<br>";
}
}
?>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
|