mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-02 17:09:36 +03:00
45 lines
742 B
C
45 lines
742 B
C
|
#pragma once
|
||
|
#ifndef EXTRACT_GHKM_STSG_RULE_H_
|
||
|
#define EXTRACT_GHKM_STSG_RULE_H_
|
||
|
|
||
|
#include "Rule.h"
|
||
|
#include "Subgraph.h"
|
||
|
|
||
|
#include <vector>
|
||
|
|
||
|
namespace Moses
|
||
|
{
|
||
|
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 Moses
|
||
|
|
||
|
#endif
|