views:

27

answers:

2

I am using pspell like this:

$ps = pspell_new("en");
if(!pspell_check($ps, $word))
{
    $suggestion = pspell_suggest($ps, $word);   
}

However I want to added some industry terms to the list.

I looked up pspell_add_to_session which says the first param is supposed to be int $dictionary_link But I do not know what that is and there is no example.

+2  A: 

In your case, the $ps variable created by pspell_new() is that "dictionary link":

$ps = pspell_new("en");
pspell_add_to_session($ps, "somenewword");
Alexander Konstantinov
Gotcha, Thanks.
John Isaacks
+1  A: 

The $dictionary_link integer is an integer representation of the pspell library handle, as returned by pspell_new or pspell_new_personal. The PHP documentation is incomplete in a lot of places regarding this variable.[1][2][3][4][5][6][7][8][9]

amphetamachine