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

Passage.hpp

Go to the documentation of this file.
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.lemurproject.org/license.html
00008  *
00009  *==========================================================================
00010 */
00011 
00012 
00013 
00014 #ifndef _PASSAGE_HPP
00015 #define _PASSAGE_HPP
00016 
00017 #include <string>
00018 #include <vector>
00019 using std::vector;
00020 using std::string;
00021 
00022 class termCount {
00023 public:
00024   int termID;
00025   int tf;
00026   double val;
00027 };
00028 
00029 typedef vector<termCount> passageVec;
00030 
00036 class Passage {
00037 
00038 public:
00039   double score;
00040   int marked;
00041   string docID;
00042   passageVec* psg;
00043 
00044   virtual ~Passage();
00045 
00047   virtual void clear() = 0;
00048 
00050   virtual void addTerm(termCount term) = 0;
00051 
00053   virtual void addTerms(const passageVec pv) = 0;
00054 
00056   virtual const passageVec* getAsVector(void) const = 0;
00057 
00059   virtual int operator<(const Passage &b) const = 0;
00060 
00061 };
00062 
00063 #endif

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