summaryrefslogtreecommitdiff
path: root/dtrain/dtrain.h
blob: 3d319233bee656aaccf27430c598eb40133ad124 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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