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

PriorFactory.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2004 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 //
00014 // PriorFactory
00015 //
00016 // 4 May 2004 -- tds
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

Generated on Wed Nov 3 12:59:01 2004 for Lemur Toolkit by doxygen1.2.18