Hunspell定制词典 [英] Hunspell Custom dictionary

查看:190
本文介绍了Hunspell定制词典的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于为hunspell构建自定义词典的问题.我现在正在使用通用英语词典和词缀文件,我想为每个用户将用户指定的单词添加到该词典中.我想知道是否有人知道我该怎么做.

任何帮助或指导都将非常有用.

谢谢,Amin

I have a question about building a custom dictionary for hunspell. I''m using a general English dictionary and affix file right now, and I want to add user specified words to that dictionary for each of my users. I was wondering if anyone know how can I do that.

Any help or direction would be great.

Thanks, Amin

推荐答案

一种方法是使用可用的字典文件并向其中添加条目.它们只是文本文件,因此您可以直接,手动或以编程方式对其进行编辑.到目前为止,我看到的文件都是基于KOI8的编码,而不是Unicode(因此,每种语言的编码不同),但这是可以解决的.例如,您可以将文件转换为Unicode,对其进行修改然后再转换回去.我不知道是否可以使用Unicode.

您可以在此处找到有关字典结构和开发的信息: http://lingucomponent.openoffice.org/dictionary.html [ ^ ].

—SA
One approach is to use available dictionary files and add entries to them. They are just the text files, so you can edit it directly, manually or programmatically. On little problem is that the files I saw so far were in KOI8-based encodings, not in Unicode (so, different encoding for each language), but this problem is solvable. You can convert the file in Unicode, modify them and convert back, for example. I don''t know if Unicode can be used.

You can find information on structure and development of dictionaries here: http://lingucomponent.openoffice.org/dictionary.html[^].

—SA


这篇关于Hunspell定制词典的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆