Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

How to store "infixes"

Name: Anonymous 2009-09-16 7:58

I need to store all possible infixes of words (and their location) to be able to quickly make queries.

(eg. anus -> a, n, u, s, an, nu, us, anu, nus, anus)

Problem is, even with small files, if you store "infix->list of positions", the index gets really really really large (obviously).

I have been trying to think of a data structure to reduce storage needed, but... I failed. Any ideas?

Name: Anonymous 2009-09-16 8:13

>>1
so the idea is that the input to this program will be an infix ('nu'), and it should return the words / indices which contain that infix ('anus' and 'nucleus'?)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List