我已成功安装了Aspell,并使用Pspell编译了PHP,一切似乎都运行良好。
唯一无法做到的是创建一个“忽略”单词列表或个人词典,不管你想怎么称呼它。
如上面的链接和Aspell文档所述,我尝试按照手册中概述的方式创建个人词典:
personal_ws-1.1 en 0
Rubiflex
quasirhombicosidodecahedron
我将其放置在aspell目录、我的主目录和根目录中,但它从未被识别。Aspell文档从未明确说明它应该位于哪里或如何加载它。
另一个参考是关于创建个人词汇表的。
这两种方法似乎都不起作用,我找不到任何清晰的示例来正确添加字典或单词列表。这是我能找到的两种最有希望的方法,但都没有成功。有人知道如何让Aspell使用我创建的个人字典文件吗?Create a txt file with the words that you'd like to add to the dictionary, where each word is on a separate line then run the following command:
aspell --lang=en create master ./custom.rws < test.txt
This will create a file called custom.rws that will contain the aspell encoded word(s) for the dictionary. You can name the file anything you want as long as the extension is .rws. Now to add this to the dictionary move the custom.rws file to the dictionary location which is /usr/lib/aspell by running the following command:
cp custom.rws /usr/lib/aspell/
To finish adding it to the dictionary change into the dictionary directory by running the following:
cd /usr/lib/aspell/ then edit the following file: nano en_US.multi
and add the following line:
add custom.rws
感谢您的时间。
编辑:这里概述的步骤对我有效。它们很像这里概述的步骤,只是后者引用了“en_US.multi”,而前者引用了“en.multi”。在将自定义列表添加到en.multi(而不是en_US.multi)之后,它按预期工作。