Array
(
[0] => Array
(
[name] => aspell
[desc] => Aspell Provider
[file] => /usr/local/Cellar/enchant/1.6.0/lib/enchant/libenchant_aspell.so
)
[1] => Array
(
[name] => ispell
[desc] => Ispell Provider
[file] => /usr/local/Cellar/enchant/1.6.0/lib/enchant/libenchant_ispell.so
)
[2] => Array
(
[name] => myspell
[desc] => Myspell Provider
[file] => /usr/local/Cellar/enchant/1.6.0/lib/enchant/libenchant_myspell.so
)
)我正在使用enchant扩展进行拼写检查,并且我需要在引擎中添加一些myspell/hunspell字典(*.dic、*.aff)。然而,我找不到正确的位置来放置它们,因此我只能访问aspell字典。
我在Windows上读到过,它们应该放在PHP/share/myspell/dict中,但在我的例子中(在MacOSX上)就不起作用了。我对enchant_broker_get_dict_path和enchant_broker_set_dict_path函数也有点困惑。它们没有出现在当前的文档中,它们仍然可用(但没有可见的效果)。
有什么想法吗?
使用PHP 5.3.28 (通过brew)。
发布于 2014-01-15 01:29:25
这就是它查找字典的地方:
/usr/share/myspell/dicts/我似乎不能控制的是,在同一语言中有多个字典的情况下,应该使用哪个字典。
https://stackoverflow.com/questions/21117483
复制相似问题