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 _SINGLEREGRMERGEMETHOD_HPP 00013 #define _SINGLEREGRMERGEMETHOD_HPP 00014 00027 00028 #define MINOVERLAPDOCNUM 3 00029 00030 #define MINLESSDBPERCEN 0.4 00031 00032 #define GETTOPDOCSNUM 20 00033 00034 #include "Param.hpp" 00035 #include "DistMergeMethod.hpp" 00036 #include "InvFPTypes.hpp" 00037 00038 00039 namespace SingleRegrMergeMethodParameter { 00040 00042 00043 static String csDbDataBaseIndex; 00045 00047 static void get() { 00048 csDbDataBaseIndex = ParamGetString("csDbDataBaseIndex",""); 00049 } 00050 }; 00051 00052 00053 class SingleRegrMergeMethod : public DistMergeMethod { 00054 public: 00056 SingleRegrMergeMethod(double constA=0.714, double constB=0.2857); 00057 ~SingleRegrMergeMethod(); 00058 00063 void calcRegrParams(IndexedRealVector &indexset, DocScoreVector* centralscores, DocScoreVector** scoresset); 00064 00065 protected: 00067 virtual double score(double dbscore, double docscore); 00068 00070 double parama; 00071 double paramb; 00072 }; 00073 00074 #endif