1

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.

hakre
  • 193,403
  • 52
  • 435
  • 836
JD Isaacks
  • 56,088
  • 93
  • 276
  • 422

2 Answers2

3

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
  • 5,406
  • 1
  • 26
  • 31
2

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
  • 27,620
  • 12
  • 60
  • 72