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

InvFPTerm.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.cs.cmu.edu/~lemur/license.html
00008  *
00009  *==========================================================================
00010 */
00011 
00012 #ifndef _INVFPTERM_HPP
00013 #define _INVFPTERM_HPP
00014 
00015 #include "TermInfoList.hpp"
00016 #include "InvFPTypes.hpp"
00017 
00019 
00022 class InvFPTerm: public TermInfo {
00023 public:
00024   friend class InvTermList;
00025   friend class InvFPTermList;
00026   friend class InvFPTermPropList;
00027 
00028   InvFPTerm() { freq=1;};
00029   ~InvFPTerm() {};
00030 
00031   const char* spelling() { return word; };
00032   void spelling(TERM_T term) { word = term; };
00033   int strLength() { return strlen; };
00034   void strLength(int len) { strlen = len; };
00035   int count() {return freq; };
00036   TERMID_T id() { return tid; };
00037   LOC_T position() { return loc; };
00038   vector<LOC_T>* positions() { return loclist; };
00039   void position(LOC_T pos) { loc = pos; };
00040 
00041 protected:
00042 
00043   TERMID_T tid;
00044   int strlen;
00045   TERM_T word; 
00046   int freq; // number of times this term occurs in this documen
00047   LOC_T loc;  // where this term (currently) occurs in the document
00048   vector<LOC_T>* loclist; // list of all places term occurs in the document                  
00049 };
00050 
00051 #endif

Generated on Fri Feb 6 07:11:47 2004 for LEMUR by doxygen1.2.16