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 
00084 
00085 
00123 // C. Zhai 02/08/2001
00124 
00125 #include "TermInfoList.hpp"
00126 #include "DocInfoList.hpp"
00127 
00128 class Index {
00129 public:
00130 
00131   virtual ~Index() {}; 
00132 
00134 
00135 
00137   virtual bool open(const char * indexName)=0;
00139 
00141 
00142 
00144   virtual int term (const char * word)=0;
00145 
00147   virtual const char * term (int termID)=0;
00148 
00150   virtual int document (const char * docIDStr)=0;
00151 
00153   virtual const char * document (int docID)=0;
00154 
00156 
00159   virtual const char *termLexiconID() { return NULL;} 
00161 
00163 
00164 
00166   virtual int docCount () =0;
00167 
00169   virtual int termCountUnique ()=0;
00170 
00172   virtual int termCount (int termID) const =0;
00173 
00175   virtual int termCount () const =0;
00176 
00178   virtual float docLengthAvg()=0;
00179 
00181   virtual int docCount(int termID)=0;
00182 
00184   virtual int docLength (int docID) const =0;
00185 
00187 
00189 
00190 
00191   virtual DocInfoList *docInfoList(int termID)=0;
00192 
00194   virtual TermInfoList *termInfoList(int docID)=0;
00195 
00197 
00198 };
00199 
00200 
00201 #endif
00202 
00203 
00204 

Generated at Fri Jul 26 18:22:26 2002 for LEMUR by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000