PhpDig.net

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




pspell_new_personal

Name

pspell_new_personal — Creates a link to a Pspell dictionary to be used in subsequent operations.

Synopsis

int pspell_new_personal(dictionary_file, language[, spelling][, jargon][, encoding][, pspell_mode]);
string dictionary_file: Pathname of personal dictionary file
string language: Language in which spell checking is to be done
string spelling (optional): Spelling variation to use, if applicable
string jargon (optional): Jargon variation to use, if applicable (see below)
string encoding (optional): Expected encoding of the checked words
int pspell_mode (optional): Mode in which Pspell will check words

Returns

If successful, a positive integer identifier for the Pspell dictionary opened; FALSE if an error occurs

Description

pspell_new_personal() opens the dictionary indicated by its arguments and returns an identifier to be used in later spelling operations.

This function works like pspell_new() , with the exception that the first argument should be the path and filename of the wordlist file you want to use for spell checking. You can use either a relative or an absolute pathname, but be aware that if you use a relative pathname, it will be taken as relative to the home directory of the current user. When used on a Web server, this will often be the home directory of the Web server process itself and not the page owner, so you should usually give an absolute path here.

The rest of the arguments are identical to their counterparts for the pspell_new() function.

Example

Example 1114. Create a link to a personal dictionary

/* I want to check spelling in English, disallowing run-together words and
 * giving a large number of suggestions for misspelled words. */
$dictid = pspell_new('/home/torben/mywordlist.pws', 'en', '', '', '', PSPELL_BAD_SPELLERS);



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.