如何在 Eclipse 中安装平台字典

发布于 2024-10-06 09:03:47 字数 226 浏览 0 评论 0 原文

为了进行拼写检查,我想在 Eclipse IDE 中安装一个令人上瘾的“平台字典”。

您可以在Window > 中看到已安装的平台词典列表。首选项>一般>编辑>文本编辑器>拼写,在“平台词典”字段中。在我的 Helios Service Release 1 中,只有英国或美国英语。我想输入我所在国家的语言,这样我就可以用我的语言写评论并进行拼写检查。 Eclipse 帮助没有解释如何操作。

For spell checking purpose I would like to install an addictional "platform dictionary" in my Eclipse IDE.

You can see the list of platform dictionaries installed in Window > Preferences > General > Editors > Text Editors > Spelling, in the field "Platform dictionary". In my Helios Service Release 1 there are only english of UK or USA. I would to put the language of my country, so I can write comments in my language and have spell check. Eclipse help doesn't explain how.

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

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

发布评论

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

评论(4

飘逸的'云 2024-10-13 09:03:47

如果您找不到您的语言单词列表,您可以使用 aspell 生成一个。

aspell --lang=pl dump master | aspell --lang=pl expand | tr ' ' '\n' > pl.dict

在 Ubuntu 中,aspell 会生成 UTF-8 格式的列表,在其他系统中,您可以添加编码选项。

--encoding=utf-8

If you can't find your language word list you can generate one using aspell.

aspell --lang=pl dump master | aspell --lang=pl expand | tr ' ' '\n' > pl.dict

In Ubuntu aspell generates list in UTF-8 in other systems you can add encoding option.

--encoding=utf-8
许一世地老天荒 2024-10-13 09:03:47

我不确定您是否可以添加“平台字典”,这样您就可以得到一个“用户定义”字典:

alt text

Eclipse 支持“字典”文件的标准每行一个字格式。
您可以在 Sourceforge.net 上的凯文单词列表上找到其中的几个,包括链接到其他网站。

I am not sure you can add a "Platform dictionary", so that leaves you with a "user defined" one:

alt text

Eclipse supports a standard one-word-per-line format for the 'dictionary' file.
You can have several of those at Kevin's Word List on Sourceforge.net, including links to other sites.

羞稚 2024-10-13 09:03:47

如果您找不到好的世界列表并且无法运行 aspell,您还可以从 Debian 获取单词列表。在 Windows 上,我使用了瑞士德语单词列表。点击全部,选择一个镜像,下载.deb文件,使用7-zip或类似的打开它,打开里面的data.tar,找到你要找的文件。就我而言,它是 /usr/share/dict/swiss

If you can't find a good worldlist and can't run aspell, you can also get wordlists from Debian. On Windows, I used the Swiss German wordlist. Klick all, pick a mirror, download the .deb file, use 7-zip or similar to open it, open the data.tar inside, and find the file you are looking for. In my case it was /usr/share/dict/swiss.

记忆里有你的影子 2024-10-13 09:03:47

感谢@VonC、@Konrad Nowicki 和@Alex Schröder 之前的回答。我发现其他答案并不完全令人满意,所以我想写下自己的答案。您的问题:

如何在 Eclipse 中安装平台字典?

对于英语:

既然您提到包含美国和英国英语,则无需解释。

对于非英语语言,例如带有 åäöü 等奇怪字符的语言,这里的示例是瑞典语(经过测试并且有效):

下载单词的文本文件。我下载单词文件的方法:我用谷歌搜索了swedish word list txt(只需将swedish更改为您要查找字典的任何语言,我希望您能找到一个 txt 字典)并找到了这个(此链接于 2018 年 9 月 25 日有效)带有瑞典语字典的 GitHub 存储库:https://github.com/martinlindhe/wordlist_swedish。只要您的字典文件的格式正确为 UTF-8 并具有 EOL(行尾)字符 Unix (LF) 就应该没问题。但是,如果它的格式不是 UTF-8,则必须转换 åäöü 字符以反映 UTF-8 标准,示例程序如下:记事本++。如果字典还有其他 EOL 字符:Windows (CR LF)Macintosh (CR),则只需将其转换为 Unix (LF),示例程序:Notepad++。然后打开一个文本编辑器,示例程序:Notepad++,将新词典附加到它所在的自定义词典中,通常是%userprofile%/eclipse/dictionary.txt~/eclipse/dictionary.txt 取决于您安装 Eclipse 的位置。重新启动 Eclipse,它应该可以工作。

Thank you @VonC, @Konrad Nowicki and @Alex Schröder for the earlier answers. I didn't find the other answers fully satisfying so I wanted to write my own answer. Your question:

How to install a platform dictionary in Eclipse?

For English:

Since you mentioned that US and UK English is included, no need to explain.

For non-English languages, like languages with strange characters like åäöü, example here is Swedish (tested and it works):

Download a text file of the words. My method for downloading a file of words: I googled swedish word list txt (just change swedish to whatever language you're looking for a dictionary and I hope you'll find a txt dictionary) and found this (this link worked 2018-09-25) GitHub repo with an Swedish dictionary: https://github.com/martinlindhe/wordlist_swedish. As long as your dictionary file is formatted correctly in UTF-8 and have EOL (End of lines) characters Unix (LF) it should be fine. However, if it isn't formatted as UTF-8 you'll have to convert the åäöü characters to reflect the UTF-8 standard, example program for this: Notepad++. If the dictionary has another EOL characters: Windows (CR LF) or Macintosh (CR), then just convert it to Unix (LF), example program for this: Notepad++. Then open a text editor, example program for this: Notepad++, to append the new dictionary to your custom dictionary where it is located, often times %userprofile%/eclipse/dictionary.txt or ~/eclipse/dictionary.txt depending on where you installed Eclipse. Restart Eclipse and it should work.

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