00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00024 using namespace std;
00025
00026 #ifndef BOSS_DURATION_DE_H
00027 #define BOSS_DURATION_DE_H
00028
00029 #include "boss_duration.h"
00030 #include <string>
00031 #include <fstream>
00032 #include <map>
00033
00042 class BOSS_Duration_DE : public BOSS_Duration {
00043 protected:
00044
00045 FMap getFeatures(const xercesc::DOMElement* element) const;
00046 void set_features(xercesc::DOMNode* sentence) const;
00047 Duration find_dur(const xercesc::DOMElement* element,
00048 BOSS::DOMNodeVector & wlist,
00049 BOSS::DOMNodeVector & stmp,
00050 BOSS::DOMNodeVector & ptmp,
00051 BOSS::DOMNodeVector & htmp,
00052 unsigned w, unsigned s, unsigned p) const;
00053
00054 float correct_dur(float mean, const unsigned p, const unsigned pnumber) const;
00055
00056 public:
00058 BOSS_Duration_DE::BOSS_Duration_DE(BOSS::Config & c, MySQL_Handler * db) : BOSS_Duration(c, db) {}
00059
00060 virtual string getDescription();
00061 };
00062
00063 extern "C" BOSS::Module * create(BOSS::Config & _cl, MySQL_Handler * _db) {
00064 return new BOSS_Duration_DE(_cl, _db);
00065 }
00066
00067 extern "C" void destroy(BOSS_Duration_DE * cm) {
00068 delete cm;
00069 }
00070
00072 #endif
00073
00074