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 00014 #ifndef _LEMURDBMANAGER_HPP 00015 #define _LEMURDBMANAGER_HPP 00016 00017 #include "DBManager.hpp" 00018 00019 #include "InvFPIndex.hpp" 00020 00021 #include "RetrievalMethod.hpp" 00022 #include "LemurMemParser.hpp" 00023 #include "RetMethodManager.hpp" 00024 00028 class LemurDBManager : public DBManager { 00029 00030 public: 00033 void open(const string &dbname); 00034 00036 results_t * query (const char * query, int numdocs) const; 00037 00039 MemParser * getParser() const; 00040 00042 doc_t * getDoc(const docid_t docid) const; 00043 00045 void output(const docid_t docid) const; 00047 void setOutputFile(const string &filename) const; 00048 00050 void close(); 00051 00052 private: 00053 00054 Index * index; 00055 RetrievalMethod * model; 00056 ScoreAccumulator * accumulator; 00057 IndexedRealVector * results; 00058 // LemurMemParser * parser; 00059 mutable ofstream * outfile; 00060 00061 }; 00062 00063 #endif