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

ReorderingOptions.cpp « parameters « moses - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2b8cafd6adad7b1af8a0d924dc8e3679746d215a (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
// -*- mode: c++; indent-tabs-mode: nil; tab-width: 2 -*-
#include "ReorderingOptions.h"

namespace Moses {

  ReorderingOptions::
  ReorderingOptions() 
    : max_distortion(-1)
    , monotone_at_punct(false)
    , use_early_distortion_cost(false)
  {}


  ReorderingOptions::
  ReorderingOptions(Parameter const& param)
  {
    init(param);
  }

  bool
  ReorderingOptions::
  init(Parameter const& param)
  {
    param.SetParameter(max_distortion, "distortion-limit", -1);
    param.SetParameter(monotone_at_punct, "monotone-at-punctuation", false);
    param.SetParameter(use_early_distortion_cost, "early-distortion-cost", false);
    return true;
  }
}