使用perl构建关键字树 [英] Keyword tree construction using 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.
谢谢.
推荐答案
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屋!