Pspell function Library: pspell_new

Source: Internet
Author: User
Keywords PHP Chinese function manual Pspell_new pspell function library
Tags aliyun code function function library html http php php chinese function manual

Pspell_new

(PHP4 CVS only)

Pspell_new---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; Load a new dictionary

Syntax: int pspell_new (String language [, string spelling [, String jargon [, string encoding [, int mode]]]

Description:

Pspell_new () opens a new dictionary and returns the dictionary link identifier to other Scrabble functions.

The parameter language is a language code, consisting of two-letter ISO 639 language code and a non-essential two-letter ISO 3166 country code.

Parameter spelling is the requested language spelling has more than one spelling, as in English there are ' Anglo ', ' Airways ' and ' Canadian '.

The parameter jargon contains additional information to differentiate the list of two different words with the same language and parameter spelling.

Parameter encoding is to encode the word, valid values are: ' Utf-8 ', ' iso8859-* ', ' koi8-r ', ' viscii ', ' cp1252 ', ' machine unsigned 16 ', ' Machine unsigned 32 '. Most of this parameter has not been tested, so be careful when you use it.

Parameter mode shows you how to use the spelling checker, and there are several ways to use it:

Pspell_fast-Fast Way (least recommended)

Pspell_normal-Standard approach (more recommended)

Pspell_bad_spellers-Slow Way (most recommended)

Pspell_run_together-The combination of words is considered to be a legitimate synthesis, meaning that "thecat" will be considered a legitimate synthesis, only that it should be separated from the word in two characters, but it will still be considered a legitimate synthesis. Changing this setting will only affect the results returned by Pspell_check (), but Pspell_suggest () will return the suggested spellings.

Parameter mode is a bit mask (bitmask) consisting of the above constants, and Pspell_fast, Pspell_normal, and Pspell_bad_spellers are independent of each other, so you can only select one of them.

For more information and examples, take a look at the online manuals on Pspell's website http://pspell.sourceforge.net/.

Example:

<?php

$pspell _link = pspell_new ("en", "" "," "," "," (pspell_fast| Pspell_run_together));

?>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.