summaryrefslogtreecommitdiff
path: root/dtrain/dtrain.h
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2011-09-23 20:53:15 +0200
committerPatrick Simianer <p@simianer.de>2011-09-23 20:53:15 +0200
commit9bde56ed23b4b97f8193f9f8f582f18086ff17c1 (patch)
tree83bd5687f2069405537f7f8fbdfbe208a634ca54 /dtrain/dtrain.h
parent4433886ac335e6db7ded081b5ef673490ee27718 (diff)
begin refactoring
Diffstat (limited to 'dtrain/dtrain.h')
-rw-r--r--dtrain/dtrain.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/dtrain/dtrain.h b/dtrain/dtrain.h
new file mode 100644
index 00000000..3d319233
--- /dev/null
+++ b/dtrain/dtrain.h
@@ -0,0 +1,60 @@
+#ifndef _DTRAIN_COMMON_H_
+#define _DTRAIN_COMMON_H_
+
+
+#include <sstream>
+#include <iostream>
+#include <vector>
+#include <cassert>
+#include <cmath>
+#include <iomanip>
+
+// cdec includes
+#include "sentence_metadata.h"
+#include "verbose.h"
+#include "viterbi.h"
+#include "kbest.h"
+#include "ff_register.h"
+#include "decoder.h"
+#include "weights.h"
+
+// boost includes
+#include <boost/algorithm/string.hpp>
+#include <boost/program_options.hpp>
+
+// own headers
+#include "score.h"
+
+#define DTRAIN_DEFAULT_K 100 // k for kbest lists
+#define DTRAIN_DEFAULT_N 4 // N for ngrams (e.g. BLEU)
+#define DTRAIN_DEFAULT_T 1 // iterations
+#define DTRAIN_DEFAULT_SCORER "stupid_bleu" // scorer
+#define DTRAIN_DOTS 100 // when to display a '.'
+#define DTRAIN_TMP_DIR "/tmp" // put this on a SSD?
+#define DTRAIN_GRAMMAR_DELIM "########EOS########"
+
+
+#include "kbestget.h"
+#include "pairsampling.h"
+
+#include "ksampler.h"
+
+// boost compression
+#include <boost/iostreams/device/file.hpp>
+#include <boost/iostreams/filtering_stream.hpp>
+#include <boost/iostreams/filter/gzip.hpp>
+//#include <boost/iostreams/filter/zlib.hpp>
+//#include <boost/iostreams/filter/bzip2.hpp>
+using namespace boost::iostreams;
+
+#include <boost/algorithm/string/predicate.hpp>
+#include <boost/lexical_cast.hpp>
+
+
+using namespace std;
+using namespace dtrain;
+namespace po = boost::program_options;
+
+
+#endif
+