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

DocUnigramCounter.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.lemurproject.org/license.html
00008  *
00009  *==========================================================================
00010 */
00011 
00012 
00013 #ifndef _DOCUNIGRAMCOUNTER_HPP
00014 #define _DOCUNIGRAMCOUNTER_HPP
00015 
00016 #include "common_headers.hpp"
00017 #include "WeightedIDSet.hpp"
00018 #include "Counter.hpp"
00019 #include "Index.hpp"
00020 
00022 
00023 class DocUnigramCounter : public ArrayCounter <int> {
00024 public:
00026   DocUnigramCounter(DOCID_T docID, const Index &homeIndex);
00027 
00029   DocUnigramCounter(const vector<DOCID_T> &docSet, const Index &homeIndex);
00030 
00032   DocUnigramCounter(const WeightedIDSet &docSet, const Index &homeIndex);
00033 
00035   DocUnigramCounter(const Index &collectionIndex);
00036 
00037   virtual ~DocUnigramCounter() {}
00038   const string lexiconID() const { return (ind.termLexiconID());}
00039 
00040 protected:
00041 
00042   void countDocUnigram(DOCID_T docID, double weight=1);
00043 
00044   const Index &ind;
00045 };
00046 
00047 
00048 #endif /* _DOCUNIGRAMCOUNTER_HPP */

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