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

TFIDFExpander.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2009 University of Massachusetts.  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 // TFIDFExpander
00014 //
00015 // 10 Aug 2009 -- dmf
00016 //
00017 
00018 #ifndef INDRI_TFIDFEXPANDER_HPP
00019 #define INDRI_TFIDFEXPANDER_HPP
00020 
00021 #include <string>
00022 #include <vector>
00023 #include <map>
00024 
00025 #include "indri/QueryExpander.hpp"
00026 #include "indri/QueryEnvironment.hpp"
00027 #include "indri/Parameters.hpp"
00028 namespace indri
00029 {
00030   namespace query
00031   {
00032     
00033     class TFIDFExpander : public QueryExpander  {
00034     private: 
00035       std::string _buildQuery(double originalWeight,
00036                               const std::vector< std::pair<std::string, double> >& expansionTerms );
00037     public:
00038       TFIDFExpander( indri::api::QueryEnvironment * env , indri::api::Parameters& param );
00039 
00040       virtual std::string expand( std::string originalQuery, std::vector<indri::api::ScoredExtentResult>& results );
00041     };
00042   }
00043 }
00044 
00045 #endif // INDRI_TFIDFEXPANDER_HPP
00046 

Generated on Tue Jun 15 11:02:56 2010 for Lemur by doxygen 1.3.4