Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Types.h « mert - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 10f00de1643c5dfda6c5368d02309a2d7209a679 (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
#ifndef MERT_TYPE_H_
#define MERT_TYPE_H_

#include <vector>
#include <map>
#include <string>
#include <utility>

namespace MosesTuning
{

class FeatureStats;
class FeatureArray;
class FeatureData;
class ScoreStats;
class ScoreArray;
class ScoreData;

typedef float parameter_t;
//typedef std::vector<parameter_t> parameters_t;confusing; use std::vector<parameter_t>
typedef std::vector<std::pair<unsigned int, unsigned int> > diff_t;
typedef std::pair<float,diff_t > threshold;
typedef std::vector<diff_t> diffs_t;
typedef std::vector<unsigned int> candidates_t;

typedef float statscore_t;
typedef std::vector<statscore_t> statscores_t;


typedef float FeatureStatsType;
typedef FeatureStatsType* featstats_t;
//typedef std::vector<FeatureStatsType> featstats_t;
typedef std::vector<FeatureStats> featarray_t;
typedef std::vector<FeatureArray> featdata_t;

typedef float ScoreStatsType;
typedef ScoreStatsType* scorestats_t;
//typedef std::vector<ScoreStatsType> scorestats_t;
typedef std::vector<ScoreStats> scorearray_t;
typedef std::vector<ScoreArray> scoredata_t;

typedef std::map<std::size_t, int> idx2name;
typedef std::map<int, std::size_t> name2idx;

typedef enum { HAMMING_DISTANCE=0, KENDALL_DISTANCE } distanceMetric_t;
typedef enum { REFERENCE_CHOICE_AVERAGE=0, REFERENCE_CHOICE_CLOSEST } distanceMetricReferenceChoice_t;

}

#endif  // MERT_TYPE_H_