使用perl构建关键字树 [英] Keyword tree construction using perl

查看:155
本文介绍了使用perl构建关键字树的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用perl编程来构建关键字树.在此示例中,关键字"Apple,Apropos,Banana,Bandana,Orange"的关键字树看起来像这样.

I want to construct a keyword tree using perl programming. Here is the example, the keyword tree looks like this for the keywords "Apple,Apropos,Banana,Bandana,Orange".

这是我第一次使用perl在树上工作.而且,当我在perl中搜索关键字树时,找不到足够的信息.我不希望完整的代码.只需说明执行任务的起点即可.这将对我有很大帮助.

This is the first time I am working on trees using perl. Moreover, I could not find enough information when I search for keyword trees in perl. I am not expecting the complete code. Just tell the starting point for doing the task. This would help me a lot.

谢谢.

推荐答案

此数据结构通常称为trie,寻找该数据结构会产生

This data structure is commonly known as a trie, and looking for that yields Tree::Trie. Maybe take a look at the source if you're looking for ideas for implementing one of your own.

这篇关于使用perl构建关键字树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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