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

PostprocessEgretForests.h « postprocess-egret-forests « phrase-extract - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 95da24c718444714f6922b3b9c9a57d029e7d848 (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
#pragma once

#include <istream>
#include <ostream>
#include <string>

namespace MosesTraining
{
namespace Syntax
{
namespace PostprocessEgretForests
{

struct Options;
class SplitPointFileParser;

class PostprocessEgretForests
{
public:
  PostprocessEgretForests() : m_name("postprocess-egret-forests") {}

  void Error(const std::string &) const;

  const std::string &GetName() const {
    return m_name;
  }

  int Main(int argc, char *argv[]);

private:
  void OneBestTree(std::istream &, std::ostream &, SplitPointFileParser *,
                   const Options &);

  void OpenInputFileOrDie(const std::string &, std::ifstream &);

  void ProcessForest(std::istream &, std::ostream &, SplitPointFileParser *,
                     const Options &);

  void ProcessOptions(int, char *[], Options &) const;

  std::string m_name;
};

}  // namespace PostprocessEgretForests
}  // namespace Syntax
}  // namespace MosesTraining