d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Python B-tree's, Is There Any Easy Way? > Inverted Index List
Add Reply New Topic New Poll
Member
Posts: 18,969
Joined: Aug 16 2007
Gold: 16,089.87
Feb 23 2015 02:37pm
I've generated a program with an inverted index list for a document of words, and I need to create a b-tree lookup structure in python that allows searches of, examples, "who* thou" and "*air* *aid*".

Basically need to find all words that have the words air in them, but not sure how create a b-tree in python is the main problem

Completed the Inverted Index (Complete)

Need to make a B-Tree, that looks up words are partial words and gives the output. (Not complete)

Thanks!
Member
Posts: 18,969
Joined: Aug 16 2007
Gold: 16,089.87
Feb 23 2015 03:56pm
I also need to add words like this to the B-Tree

Add $ to the end of the word
Code
for letter in word
copy/remove first letter of string
add letter to back of string
add word to b-tree


Loop iterations should look like
hello$
ello$h
llo$he
lo$hel
o$hell
$hello

This post was edited by Trev on Feb 23 2015 03:57pm
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll