什么是创建字典应用程序的最佳方法 [英] what is the best way to create a dictionary application

查看:61
本文介绍了什么是创建字典应用程序的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近几天,我决定创建一个新的字典应用程序,我在互联网上搜索了如何实现数据库文件和搜索算法,但未找到任何结果

如果您对如何创建字典以及如何构造其数据库文件有任何想法,请帮助!!

注意:我不想使用MS SQL Server或MySql之类的DMS(数据库管理系统),我只想使用文本文件或自定义格式文件

解决方案

<您的问题太含糊了; 新词典应用程序"是什么意思?您希望它提供什么类型的词典以及什么功能?
然后,您问如何为字典构建数据库,然后立即说不想使用数据库,而是要使用文本文件,就立即进行跟进.我建议除非使用某种形式的数据库进行快速查找,否则完整的语言词典将不是很有效.看看 SQL Express Compact Edition [ http://xdxf.sourceforge.net/ [ ^ ].您可以找到这种格式的词典数量. (真正的问题不是软件.真正的障碍是获取实际数据,即字典本身;单词太多:-).)

由于性能是一个问题,因此我以也接受原始XDXF格式的方式来实现它,但是应将其重新加工为二进制格式并进行索引,因此在第二次使用时,可以使用索引的二进制版本.有些使用XDXF的实现直接存在,因为我从未尝试过(您可能想找出它们并尝试一下).也许我对表演的要求太高了:-),但是我真的很享受答案,但是没人会注意到.

—SA


在此处查看我的文章:

RaptorDB持久键/值字典

hOOt全文搜索引擎


In the last few days I decided to create a new dictionary application, I searched the internet for how to implement database files and search algorithms but I found nothing

If you have any idea about how dictionaries are created and how a its database files are structured, please help !!

Note: I don''t want to use DMS (data base management system) like MS SQL server or MySql, I just want to use text files or custom format file

解决方案

Your question is far too vague; what do you mean by "a new dictionary application"? What type of dictionary, and what functions do you expect it to provide?
You then ask how to structure a database for a dictionary, and immediately follow that up by saying you don''t want to use a database but a text file. I would suggest that a full language dictionary will not be very efficient unless it is using some form of database for quick lookup. Take a look at SQL Express Compact Edition[^] as a starting point.


With all the approaches, the problem is performance of the application in part of assess to storage system and search for the word requested be the user. A good dictionary should show the close entries when a user just starts to print a work letter by letter and point to more and more precise position in the list of entries (or create such list of entries on the fly) as the user adds letters.

I have implemented such system and know that the bottleneck is the search in the storage system. To achieve required performance, the storage should better be local, presented in a binary form and indexed by the first letters in a special way. So, the storage should contain two or more separate storage parts: one for index (loaded in the memory) and another one is a complete dictionary. Index should point to the positions in the stream for each dictionary entry.

So, my comment to the XML storage suggested by DominicZA. There is a ready-to-use standard for it, called XDXF, see http://xdxf.sourceforge.net/[^]. You can find number of dictionaries in this format. (Real problem is not the software. The real barrier is to obtain actual data, the dictionary itself; there are too many words :-).)

As performance is an issue, I implement it the way the original XDXF format is also accepted, but it should be re-worked to a binary format and indexed, so on second use the indexed binary version could be used. Some implementations using XDXF directly exist, by I never tried them (you may want to find out them and try). Probably my requirements to performances are too high :-), but I really enjoy answers with the delay which no one can possibly notice.

—SA


Check out my articles here :

RaptorDB persisted key/value dictionary

hOOt full text search engine


这篇关于什么是创建字典应用程序的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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