Main Page   Namespace List   Class Hierarchy   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 
00017 
00055 // C. Zhai 02/08/2001
00056 
00057 #include "TermInfoList.hpp"
00058 #include "DocInfoList.hpp"
00059 #include "DocumentManager.hpp"
00060 
00061 class Index {
00062 public:
00063 
00064   virtual ~Index() {}; 
00065 
00067 
00068 
00070   virtual bool open(const char * indexName)=0;
00072 
00074 
00075 
00077   virtual int term (const char * word)=0;
00078 
00080   virtual const char * term (int termID)=0;
00081 
00083   virtual int document (const char * docIDStr)=0;
00084 
00086   virtual const char * document (int docID)=0;
00087 
00090   //  virtual const char* docManager(int docID) { return NULL;}
00091   virtual DocumentManager* docManager(int docID) {return NULL;}
00092 
00093 
00095 
00098   virtual const char *termLexiconID() { return NULL;} 
00099 
00101 
00103 
00104 
00106   virtual int docCount () =0;
00107 
00109   virtual int termCountUnique ()=0;
00110 
00112   virtual int termCount (int termID) const =0;
00113 
00115   virtual int termCount () const =0;
00116 
00118   virtual float docLengthAvg()=0;
00119 
00121   virtual int docCount(int termID)=0;
00122 
00124   virtual int docLength (int docID) const =0;
00125 
00127 
00129 
00130 
00131   virtual DocInfoList *docInfoList(int termID)=0;
00132 
00134   virtual TermInfoList *termInfoList(int docID)=0;
00135 
00137 
00138 };
00139 
00140 
00141 #endif
00142 
00143 
00144 

Generated on Fri Feb 6 07:11:46 2004 for LEMUR by doxygen1.2.16