Hunspell - 无法打开名为 en_US 的词典的词缀或词典文件
我想使用 hunspell 来检查我的仓库的拼写。但是,当我尝试运行它时,出现以下错误:
Can't open affix or dictionary files for dictionary named "en_US".
如何解决此问题?我在 Mac 上。
谢谢,凯文
I'd like to use hunspell to spell check my repo. However when I try to run it I get the following error:
Can't open affix or dictionary files for dictionary named "en_US".
How can I fix this? I'm on a Mac.
Thanks, Kevin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
执行 hunspell -D 。您应该得到如下输出:
这列出了 hunspell 正在其中搜索字典文件的目录以及已找到的字典。如果字典
en_US
未列出,则表明您尚未安装该特定字典。要安装字典,请在 LibreOffice 扩展存储库 中搜索它。下载它,然后将
.aff
和.dic
文件解压到hunspell -D
列出的位置之一。例如:Execute
hunspell -D
. You should get output like this:This lists the directories in which
hunspell
is searching for dictionary files, as well as the dictionaries is has found. If the dictionaryen_US
isn't listed, you haven't got that particular dictionary installed.To install a dictionary, search for it in the LibreOffice extension repository. Download it then extract the
.aff
and.dic
files to one of the locations listed byhunspell -D
. For example:我在 Windows 中使用 emacs,使用 msys2。我安装了以下 2 个软件包:
mingw-w64-x86_64-hunspell-en 软件包在 /mingw64/share/hunspell 中安装英语词典,但您检查文件(en_US.dic 和 en_US.aff)是否可用。
步骤:
在 mysys2 内的 .bashrc 中设置环境变量。没有 DICPATH 它对我不起作用。
运行 hunspell.exe -D
Hunspell 1.6.0
I'm using emacs in windows using msys2. I installed following 2 packages:
The mingw-w64-x86_64-hunspell-en package install english dictionaries in /mingw64/share/hunspell, but you check if the files (en_US.dic and en_US.aff) are available or not.
Steps:
set the Environment Variable in .bashrc within mysys2. Without DICPATH it was not working for me.
run hunspell.exe -D
Hunspell 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/ 文件夹中。
I was lucky to find my language here: https://extensions.openoffice.org/en/search?query=de_CH&sort_by=field_project_stats_year&sort_order=DESC
And with the comment from @RobDavenport i was able to rename the extension and extract the files. Something i reread at this link and gave it a try.
I dropped the .dic .dat and .aff into my ~/Library/Spelling/ folder.