00001 /*========================================================================== 00002 * Copyright (c) 2002 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 #include <vector> 00013 00014 using std::vector; 00015 00016 #ifndef _PASSAGE_HPP 00017 #define _PASSAGE_HPP 00018 00019 class termCount { 00020 public: 00021 int termID; 00022 int tf; 00023 double val; 00024 }; 00025 00026 typedef vector<termCount> passageVec; 00027 00033 class Passage { 00034 00035 public: 00036 double score; 00037 int marked; 00038 char* docID; 00039 passageVec* psg; 00040 00041 virtual ~Passage(); 00042 00044 virtual void clear() = 0; 00045 00047 virtual void addTerm(termCount term) = 0; 00048 00050 virtual void addTerms(passageVec pv) = 0; 00051 00053 virtual passageVec* getAsVector(void) = 0; 00054 00056 virtual int operator<(Passage &b) = 0; 00057 00058 }; 00059 00060 #endif