PhpDig.net

What is PhpDig?
PhpDig is a PHP MySQL based
Web Spider & Search Engine.




Pspell Functions


The Pspell library adds a generic spell-checking interface to PHP. To use these functions, you need to install both the Aspell and Pspell libraries, which you can download from http://aspell.sourceforge.net and http://pspell.sourceforge.net, respectively.

When using Pspell, you will usually be working with one or both of two wordlists: the system wordlist, which is loaded from a central location, shared by all users on the system, and which you cannot modify; and the personal wordlist, which is stored for your own use and to which you can add your own words and/or spelling modifications.

Pspell dictionary files (PWLI files) are named according to the language, encoding, jargon, and module (explained in the list below). To determine the location of the system dictionaries, you can use the command pspell-config pkgdatadir. The naming scheme for PWLI files is as follows:

<language>[-[spelling][-jargon]]-<module>.pwli


The meanings of the parts of the name are:

  • language: The two-letter language code. Required.

  • spelling: The spelling preference to use within a given language; for instance, 'american', 'canadian', or 'british'. If this is left out of the name, two dashes must separate language and jargon. Optional.

  • jargon: Distinguishes between words having the same language and spelling; examples include 'medical' and 'xlg'. Optional.

  • module: The spelling module for which the list is intended; for instance, 'aspell' or 'ispell'. Required.



Examples of some of the dictionary filenames found on the author's system:

  • en-british-aspell.pwli

  • en-british-lrg-aspell.pwli

  • en-british-med-aspell.pwli

  • en-canadian-aspell.pwli



This extension is only available in versions of PHP greater than PHP 4.0.2.




PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing (Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch). This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/). The authors of this book have elected not to choose any options under the OPL. This online book was obtained from http://www.fooassociates.com/phpfer/ and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4 for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All persons and entities shall have neither liability nor responsibility to any person or entity with respect to any loss or damage arising from the information contained in this book.

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.