Geoff Hutchison writes:
 > 
 > One final concern: this model makes it very difficult to add the 
 > AltaVista url: syntax for adding in URL restricts. I'm not sure how a 
 > ParseTree should pass up information like this about how the search 
 > should be performed. For now I'm content to shelve the problem until 
 > we can get a clean, working replacement for the current code. ;-)
 > 
 > What do people think?

 I recently implemented a search algorithm (in the current mifluz package
from CVS file mifluz/test/search.cc) and found that it was convinient that
the base class of the syntax tree inherit from the iterator of the WordList
class. Each node of the syntax tree has a semantic that mimics the WordList
iterator and implementing various retrieval models is made easier. If it is
not desirable to implement a syntax tree that depends on WordList, another
class hierarchy can be built and the 'pure' syntax tree can be mutated into
a WordList inherited syntax tree for query resolution purpose.
 Instead of building a binary syntax tree (each node has a left/right child)
I also find it a lot more convinient to build a N-ary tree. For instance
a Or node has N children and the query:

  (or foo bar frob) is 

  or -> foo
     -> bar
     -> frob

  This also makes it quite easy to implement the AltaVista like simple syntax
search. In fact the NOT operator is implemented as a minus in simple AltaVista
query syntax in all cases. 

  ( or foo bar ( not ( and frob nitz )  )  ) is handle in the same way than
  ( or foo bar -frob  ) 

  The current test implementation of mifluz does not allow to implement
ranking of results the way Ht://Dig currently do because it does not return
the list of all possible matches, just the matches from N to M occurences. 
It's still a test case as far as Ht://Dig is concerned.

  Cheers,

-- 
                Loic Dachary

                24 av Secretan
                75019 Paris
                Tel: 33 1 42 45 09 16
                e-mail: [EMAIL PROTECTED]
                URL: http://www.senga.org/


------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] 
You will receive a message to confirm this. 


Reply via email to