PHP:向 pspell 添加单词?

发布于 2024-09-10 01:04:11 字数 267 浏览 1 评论 0 原文

我像这样使用 pspell:

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

但是我想在列表中添加一些行业术语。

我查了一下 pspell_add_to_session ,上面说第一个参数应该是 int $dictionary_link 但我不知道那是什么,也没有例子。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

甜柠檬 2024-09-17 01:04:11

在您的情况下,由 pspell_new() 创建的 $ps 变量是“字典链接”:

$ps = pspell_new("en");
pspell_add_to_session($ps, "somenewword");

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

$ps = pspell_new("en");
pspell_add_to_session($ps, "somenewword");
謌踐踏愛綪 2024-09-17 01:04:11

$dictionary_link 整数是 pspell 库句柄的整数表示,由 pspell_newpspell_new_personal。 PHP 文档中关于此变量的很多地方都不完整。[1][2 ][3][< a href="http://www.php.net/manual/en/function.pspell-config-ignore.php" rel="nofollow noreferrer">4][5][6][7][8][ 9]

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]

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文