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

Index.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2001 Carnegie Mellon University.  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.cs.cmu.edu/~lemur/license.html
00008  *
00009  *==========================================================================
00010 */
00011 
00012 
00013 #ifndef _INDEX_HPP
00014 #define _INDEX_HPP
00015 
00084 
00085 
00123 // C. Zhai 02/08/2001
00124 
00125 #include "TermInfoList.hpp"
00126 #include "DocInfoList.hpp"
00127 #include "DocumentManager.hpp"
00128 
00129 class Index {
00130 public:
00131 
00132   virtual ~Index() {}; 
00133 
00135 
00136 
00138   virtual bool open(const char * indexName)=0;
00140 
00142 
00143 
00145   virtual int term (const char * word)=0;
00146 
00148   virtual const char * term (int termID)=0;
00149 
00151   virtual int document (const char * docIDStr)=0;
00152 
00154   virtual const char * document (int docID)=0;
00155 
00158   //  virtual const char* docManager(int docID) { return NULL;}
00159   virtual DocumentManager* docManager(int docID) {return NULL;}
00160 
00161 
00163 
00166   virtual const char *termLexiconID() { return NULL;} 
00167 
00169 
00171 
00172 
00174   virtual int docCount () =0;
00175 
00177   virtual int termCountUnique ()=0;
00178 
00180   virtual int termCount (int termID) const =0;
00181 
00183   virtual int termCount () const =0;
00184 
00186   virtual float docLengthAvg()=0;
00187 
00189   virtual int docCount(int termID)=0;
00190 
00192   virtual int docLength (int docID) const =0;
00193 
00195 
00197 
00198 
00199   virtual DocInfoList *docInfoList(int termID)=0;
00200 
00202   virtual TermInfoList *termInfoList(int docID)=0;
00203 
00205 
00206 };
00207 
00208 
00209 #endif
00210 
00211 
00212 

Generated on Tue Nov 25 11:26:44 2003 for Lemur Toolkit by doxygen1.2.18