我想使用 hunspell 拼写检查我的回购。但是,当我尝试运行它时,出现以下错误:
Can't open affix or dictionary files for dictionary named "en_US".
我怎样才能解决这个问题?我在 Mac 上。
谢谢,凯文
我想使用 hunspell 拼写检查我的回购。但是,当我尝试运行它时,出现以下错误:
Can't open affix or dictionary files for dictionary named "en_US".
我怎样才能解决这个问题?我在 Mac 上。
谢谢,凯文
执行hunspell -D
。你应该得到这样的输出:
.::/usr/share/hunspell:/usr/share/myspell:
/usr/share/myspell/dicts:/Library/Spelling:
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
/Library/Spelling/en_GB
LOADED DICTIONARY:
/Library/Spelling/en_GB.aff
/Library/Spelling/en_GB.dic
这列出了正在其中hunspell
搜索字典文件的目录,以及已找到的字典。如果en_US
未列出该词典,则说明您没有安装该特定词典。
要安装字典,请在LibreOffice 扩展存储库中搜索它。.aff
下载它,然后将和文件解压缩.dic
到 列出的位置之一hunspell -D
。例如:
# First download dict-en.oxt
unzip dict-en.oxt -d dict-en
cp dict-en/en_GB.aff dict-en/en_GB.dic ~/Library/Spelling/
rm -r dict-en
我在使用 msys2 的 windows 中使用 emacs。我安装了以下 2 个软件包:
pacman -S mingw-w64-x86_64-hunspell-en mingw-w64-x86_64-hunspell
mingw-w64-x86_64-hunspell-en 软件包在 /mingw64/share/hunspell 中安装英文词典,但您检查文件(en_US.dic 和 en_US.aff)是否可用。
脚步:
在 mysys2 中的 .bashrc 中设置环境变量。没有 DICPATH 它对我不起作用。
export DICTIONARY=en_US
export DICPATH=/d/../msys2/ming164/share/hunspell
运行 hunspell.exe -D
SEARCH PATH:
.;... ;...;...
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
D:/xx/mysys64/mingw64/share/hunspell/en_AG
D:/xx/mysys64/mingw64/share/hunspell/en_AU
...
汉斯佩尔 1.6.0
我很幸运在这里找到了我的语言:https ://extensions.openoffice.org/en/search?query=de_CH&sort_by=field_project_stats_year&sort_order=DESC
通过@RobDavenport 的评论,我能够重命名扩展名并提取文件。我在这个链接上重读了一些东西并试了一下。我将 .dic .dat 和 .aff 放到我的 ~/Library/Spelling/ 文件夹中。