Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

StructQueryRep.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2002 University of Massachusetts.  All Rights Reserved.
00003  *
00004  * Use of the Lemur Toolkit for Language Modeling and Information Retrieval
00005  * is subject to the terms of the software license set forth in the LICENSE
00006  * file included with this software, and also available at
00007  * http://www.lemurproject.org/license.html
00008  *
00009  *==========================================================================
00010 */
00011 /*
00012   author: fff
00013 */
00014 
00015 #ifndef _STRUCTQUERYREP_HPP
00016 #define _STRUCTQUERYREP_HPP
00017 
00018 #include "RetrievalMethod.hpp"
00019 #include "TextQuery.hpp"
00020 #include "Index.hpp"
00021 #include "QueryNode.hpp"
00022 
00027 class StructQueryRep : public QueryRep {
00028 public:
00030   StructQueryRep(const TermQuery &qry, const Index &dbIndex, 
00031                  double dbelief = 0);
00032 
00033   virtual ~StructQueryRep() {
00034     delete(topNode);
00035   }
00039   virtual QueryNode * topnode() const {return topNode;}
00041   virtual void setTopnode(QueryNode *qn) {topNode = qn;}
00042   
00043 private:
00045   typedef QueryNode *(StructQueryRep::*getFunc)(const TermQuery &, const Term *,
00046                                                 double);
00048   QnList * getChildren(const TermQuery &qry, getFunc fn, 
00049                                bool weigh = false);
00051   QueryNode * getQryNode(const TermQuery &qry, const Term *tok, double w);
00053   QueryNode * getProxQryNode(const TermQuery &qry, const Term *tok,
00054                                      double w = 1.0);
00056   QueryNode *topNode;
00058   QueryNode *qStack[100]; 
00059 
00060   int topqStack;
00062   double dw;
00064   const Index &ind;
00066   int numDocs;
00067 };
00068 #endif /* _STRUCTQUERYREP_HPP */
00069 

Generated on Wed Nov 3 12:59:04 2004 for Lemur Toolkit by doxygen1.2.18