00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 #ifndef _RETMETHODMANAGER_HPP
00013 #define _RETMETHODMANAGER_HPP
00014 
00015 #include "RetParamManager.hpp"
00016 #include "TextHandlerManager.hpp"
00017 #include "InQueryOpParser.hpp"
00018 #include "StringQuery.hpp"
00019 
00020 namespace lemur 
00021 {
00022   namespace api
00023   {
00025     class RetMethodManager {
00026     public:
00027       enum RetModel {UNKNOWN=-1, TFIDF=0, OKAPI=1, KL=2, INQUERY=3,CORI_CS=4,COS=5, INQ_STRUCT=6, INDRI=7};
00028 
00030       static RetrievalMethod* createModel(const Index* ind, ScoreAccumulator* accum, RetModel type);
00031 
00033       static RetrievalMethod* createModel(const Index* ind, ScoreAccumulator* accum, string type = "");
00034 
00040       static IndexedRealVector* runQuery(const string& query, const Index* index, const string& modeltype, const string& stopfile="", const string& stemtype="", const string& datadir="", const string& func="");
00041 
00046       static IndexedRealVector* runTextQuery(const string& query, TextQueryRetMethod* model, const string& stopfile="", const string& stemtype="", const string& datadir="", const string& func="");
00047 
00052       static IndexedRealVector* runStructQuery(const string& query, StructQueryRetMethod* model, const string& stopfile="", const string& stemtype="", const string& datadir="", const string& func="");
00053     };
00054   }
00055 }
00056 
00057 #endif