Hi experts,
I am working on a keyword retrieval project. Here is an example.
Assume that the following is a keyword file.
Serial Number Keywords
10 this
11 this is
33 this is notebook
38 This
68 Yahoo com
70 yahoo is this
Now I have a query string like this:
"This is yahoo com"
Then I should get all the keywords in the keyword file except "This is notebook". The principle is that the keyword(s) is/are retrieved if and only if it/they occur in the query string. Case is ignored. "Yahoo" and "yahoo" are all treated as the same.
Now my question is:
How to design such a data structure and algorithm so that I can retrieve the keywords quickly. This system has a really high requirement for the retrieval time. So the faster is the better.
Please spend some time to consider this question and your answer before you reply. I used hashtable and chaining list but the running time is too long to afford.
Thanks so much.
Start Free Trial