00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef INDRI_PRIORFACTORY_HPP
00020 #define INDRI_PRIORFACTORY_HPP
00021
00022 #include "indri/QuerySpec.hpp"
00023 #include "indri/Parameters.hpp"
00024
00025 class PriorFactory {
00026 private:
00027 struct prior_data {
00028 std::string field;
00029 std::map<int, indri::lang::PriorNode::tuple_type> tuples;
00030 };
00031
00032 Parameters _parameters;
00033 std::map<std::string, prior_data> _data;
00034
00035 void _readPriorFile( prior_data& data, const std::string& fileName );
00036 void _readParamValues( prior_data& data, class Parameters& range );
00037
00038 public:
00039 PriorFactory();
00040 PriorFactory( Parameters& parameters );
00041 void initialize();
00042 indri::lang::PriorNode* create( const std::string& name );
00043 };
00044
00045 #endif // INDRI_PRIORFACTORY_HPP