实现一个索引的文本文件内容 [英] Implementing a index for text file content

查看:317
本文介绍了实现一个索引的文本文件内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个庞大的数目字(〜50MB)的文本文件。对于建立一个索引文件的内容,该数据结构是最适合?

I have a text file with a huge number of words( ~50MB ). For building an index for this file content , which data structure is best suited ?

或者用什么数据结构,我能达到最好的效果,同时寻找?

Or using what data structure , I can achieve best results while searching ?

在此先感谢

Jijoy

推荐答案

如果你的数据是字的字典中的特里是非常适合。

If your data is a dictionary of words a Trie is well-suited.

这篇关于实现一个索引的文本文件内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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