i have some data:
A
AXNHJNEHWXNOECMEJK
DNFJNXYEEQWhsdbchjsxs
XMJQWsdsEOJdfsKMDJE
....
Each row is array and each letter is object. I have comparer function which could say that letter A is equavalent of letter a(actually it is not letter. It's russian words and comparer function use morphology to let me know that word are equal for example матрешка==матрешки==матрешкины and arrays are russian sentences. For example: "Мама мыла раму"). I want to create tree data structure which looks like:
1) A
2.1) BA
2.2) DHBAFH
3.1) BEDMEWA
etc...
Otherwise child nodes must contain letters from parent nodes. If you know how to work google adwords i think you can understand me. My question is how to do that FAST. I need to create tree with thousands arrays. Compare function works very slow(it use big dictionary) that's why speed is real problem.
Some simple data(sorry for russian):
here is set of sentences
сайты
сайты недорого
сайты дешево
сайты дешево и быстро
красивый сайт по доступным ценам
хочу купить хороший стул
стул по доступным ценам
we must create following tree data structure
1) сайты
1->2.1) сайты недорого
1->2.2) сайты дешево
1->2.3) красивый сайт по доступным ценам
1->2.2->3) сайты дешево и быстро
other parent nodes:
1) хочу купить хороший стул
1) стул по доступным ценам
Child nodes must contain more words then parent.