00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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