PHP: enchant Functions - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

enchant_broker_describe xptr_new_context

Last updated: Sat, 27 Jan 2007

view this page in

# XXXII. enchant Functions

# Введение

Enchant is the PHP binding for the Enchant library. Enchant steps in to provide uniformity and conformity on top of all spelling libraries, and implement certain features that may be lacking in any individual provider library. Everything should "just work" for any and every definition of "just working."

Enchat supports the following backends:

- `Aspell/Pspell (intends to replace Ispell)`

- `Ispell (old as sin, could be interpreted as a defacto standard)`

- `MySpell/Hunspell (an OOo projects, also used by Mozilla)`

- `Uspell (primarily Yiddish, Hebrew, and Eastern European languages - hosted in AbiWord's CVS under the module "uspell")`

- `Hspell (Hebrew)`

- `AppleSpell (Mac OSX)`

# Требования

This version uses the functions of the Enchant library by Dom Lachowicz. You need Enchant 1.2.4 or later.

# Установка

Дополнительная информация, такая как новый версии, скачивание, исходные файлы, информация о разработчике и CHANGELOG, могут быть найдены здесь: http://pecl.php.net/package/enchant.

# Настройка во время выполнения

Данное расширение не определяет никакие директивы конфигурации в `php.ini`.

# Типы ресурсов

There are two types of resources in this extension. The first one is the broker (backends manager) and the second is for the dictionary.

# Примеры

Пример 1. Enchant Usage Example

`<?php
$tag = 'en_US';
$r = enchant_broker_init();
$bprovides = enchant_broker_describe($r);
echo "Current broker provides the following backend(s):\n";
print_r($bprovides);
$dicts = enchant_broker_list_dicts($r);
print_r($dicts);
if (enchant_broker_dict_exists($r,$tag)) {
$d = enchant_broker_request_dict($r, $tag);
$dprovides = enchant_dict_describe($d);
echo "dictionary $tag provides:\n";
$spellerrors = enchant_dict_check($d, "soong");
print_r($dprovides);
echo "found $spellerrors spell errors\n";
if ($spellerrors) {
$suggs = enchant_dict_suggest($d, "soong");
echo "Suggestions for 'soong':";
print_r($suggs);
}
enchant_broker_free_dict($d);
} else {
}
enchant_broker_free($r);
?>`

add a note User Contributed Notes
enchant Functions
There are no user contributed notes for this page.
enchant_broker_describe xptr_new_context

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST