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 
00157   virtual const char* docManager(int docID) { return NULL;}
00158 
00159 
00161 
00164   virtual const char *termLexiconID() { return NULL;} 
00165 
00167 
00169 
00170 
00172   virtual int docCount () =0;
00173 
00175   virtual int termCountUnique ()=0;
00176 
00178   virtual int termCount (int termID) const =0;
00179 
00181   virtual int termCount () const =0;
00182 
00184   virtual float docLengthAvg()=0;
00185 
00187   virtual int docCount(int termID)=0;
00188 
00190   virtual int docLength (int docID) const =0;
00191 
00193 
00195 
00196 
00197   virtual DocInfoList *docInfoList(int termID)=0;
00198 
00200   virtual TermInfoList *termInfoList(int docID)=0;
00201 
00203 
00204 };
00205 
00206 
00207 #endif
00208 
00209 
00210 

Generated on Mon Sep 30 14:13:21 2002 for LEMUR by doxygen1.2.18