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

LemurIndriIndex.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2004 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 
00013 
00014 #ifndef LEMURINDRI_INDEX_HPP
00015 #define LEMURINDRI_INDEX_HPP
00016 
00017 /*
00018  * NAME DATE - COMMENTS
00019  * dmf 09/04 - Lemur Index API wrapper on Indri Repository
00020 */
00021 
00022 #include "Index.hpp"
00023 #include "indri/Repository.hpp"
00024 
00027 class LemurIndriIndex : public Index {
00028 public:
00030   LemurIndriIndex();
00031 
00032   virtual ~LemurIndriIndex();
00033 
00035 
00036 
00038   bool open(const std::string& indexName);
00039 
00041   bool open( const char* indexName ) {
00042     return open(string(indexName));
00043   }
00045   void close();
00047 
00049 
00050 
00052   TERMID_T term(const TERM_T &word) const;
00053 
00055   const TERM_T term(TERMID_T termID) const;
00056 
00058   DOCID_T document(const EXDOCID_T &docIDStr) const;
00059 
00061   const EXDOCID_T document(DOCID_T docID) const;
00062 
00064 
00066 
00067 
00069   COUNT_T docCount() const;
00070 
00072   COUNT_T termCountUnique() const;
00073 
00075   COUNT_T termCount(TERMID_T termID) const;
00076 
00078   COUNT_T termCount() const;
00079 
00081   float docLengthAvg() const;
00082 
00084   COUNT_T docCount(TERMID_T termID) const;
00085 
00087   COUNT_T docLength( DOCID_T documentID ) const;
00088 
00090 
00092   DocInfoList* docInfoList(TERMID_T termID) const;
00093 
00095   TermInfoList* termInfoList(DOCID_T docID) const;
00096 
00098   TermInfoList* termInfoListSeq(DOCID_T docID) const;
00099 
00100   const DocumentManager* docManager(DOCID_T docID) const {
00101     return _docMgr;
00102   }
00103   
00104   //  const Repository *getRepository() const {return _repository;}
00105   const string &getRepositoryName() const {return _repositoryName;}
00106   
00107 private:
00108   Repository *_repository;
00109   string _repositoryName;
00110   DocumentManager *_docMgr;
00111 };
00112 
00113 #endif // LEMURINDRI_INDEX_HPP
00114 

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