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

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2014-08-02 20:15:01 +0400
committerHieu Hoang <hieuhoang@gmail.com>2014-08-02 20:15:01 +0400
commit688bf4c061e64844a8c1b0326ae9b26fe1b8ab17 (patch)
tree9aeac655c5146270a34c84f43a29dfc49191da88 /moses/DecodeGraph.h
parente4c5ba2edfac078a609a96b828ed46f114908d4a (diff)
each target phrase knows what decode graph created it
Diffstat (limited to 'moses/DecodeGraph.h')
-rw-r--r--moses/DecodeGraph.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/moses/DecodeGraph.h b/moses/DecodeGraph.h
index ecac3ee7e..aa5c7ace9 100644
--- a/moses/DecodeGraph.h
+++ b/moses/DecodeGraph.h
@@ -38,7 +38,7 @@ class DecodeGraph
{
protected:
std::list<const DecodeStep*> m_steps;
- size_t m_position;
+ size_t m_id; // contiguous unique id, starting from 0
size_t m_maxChartSpan;
size_t m_backoff;
@@ -46,15 +46,15 @@ public:
/**
* position: The position of this graph within the decode sequence.
**/
- DecodeGraph(size_t position)
- : m_position(position)
+ DecodeGraph(size_t id)
+ : m_id(id)
, m_maxChartSpan(NOT_FOUND)
, m_backoff(0)
{}
// for chart decoding
- DecodeGraph(size_t position, size_t maxChartSpan)
- : m_position(position)
+ DecodeGraph(size_t id, size_t maxChartSpan)
+ : m_id(id)
, m_maxChartSpan(maxChartSpan) {
}
@@ -90,8 +90,8 @@ public:
m_backoff = backoff;
}
- size_t GetPosition() const {
- return m_position;
+ size_t GetId() const {
+ return m_id;
}
};