Then searches for these words in the database and returns the documents that receive the expression .. Then I used the dictionary like this: And I searched every word in the database, then added it to the list of document IDs in the document - I have declared two methods. The problem is: Where then combine two lists of words. If I think you have to write a type of grammar. Can help you, as you can in LEX and YACC Community is important, I hope you will be able to complete your grammar so far. I hope this helps JP
I should create a search engine so that any Boolean expression like (word1 + word2) -! Word 3 - where
+ stands for
and ,
- means
or and
! means
not .
< Code> dictionary & lt; String, list & lt; Int & gt; & Gt; Word and doc = new dictionary & lt; String, list & lt; Int & gt; & Gt; ();
To merge two lists first:
Public list & lt; Int & gt;
public list & lt; Int & gt; The problem is: How should I parse Boolean expression in the text box (list & lt; int & gt; p1, list & lt; int & gt; p2)
+ is
- is in the end, then consolidation two lists to prepare a list of required document IDs ... please help me and thank you very much.
Comments
Post a Comment