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

StsgRule.h « extract-ghkm « phrase-extract - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a037a8d91221b97bc96fc8a5c19a017518ce1dce (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
#pragma once
#ifndef EXTRACT_GHKM_STSG_RULE_H_
#define EXTRACT_GHKM_STSG_RULE_H_

#include <vector>

#include "Rule.h"
#include "Subgraph.h"

namespace MosesTraining
{
namespace GHKM
{

class Node;

class StsgRule : public Rule
{
public:
  StsgRule(const Subgraph &fragment);

  const std::vector<Symbol> &GetSourceSide() const {
    return m_sourceSide;
  }
  const Subgraph &GetTargetSide() const {
    return m_targetSide;
  }
  const std::vector<int> &GetNonTermAlignment() const {
    return m_nonTermAlignment;
  }
  int Scope() const {
    return Rule::Scope(m_sourceSide);
  }

private:
  std::vector<Symbol> m_sourceSide;
  Subgraph m_targetSide;
  std::vector<int> m_nonTermAlignment;
};

}  // namespace GHKM
}  // namespace MosesTraining

#endif