diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2012-11-13 21:43:52 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2012-11-13 21:43:52 +0400 |
commit | bc64acaaa4bb5d3e0200e68186d14c398ae57c7f (patch) | |
tree | 6ffe4cf7af41bbae4a176d6c03ae1545efdfb63c /moses/ChartCell.cpp | |
parent | f8e185602296fcff8ea90c44d4a754fcb75d7809 (diff) |
remove hardcoded label for top of sentence
Diffstat (limited to 'moses/ChartCell.cpp')
-rw-r--r-- | moses/ChartCell.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/moses/ChartCell.cpp b/moses/ChartCell.cpp index df2770533..fd163450e 100644 --- a/moses/ChartCell.cpp +++ b/moses/ChartCell.cpp @@ -177,6 +177,19 @@ size_t ChartCell::GetSize() const return ret; } +const HypoList *ChartCell::GetAllSortedHypotheses() const +{ + HypoList *ret = new HypoList(); + + MapType::const_iterator iter; + for (iter = m_hypoColl.begin(); iter != m_hypoColl.end(); ++iter) { + const ChartHypothesisCollection &coll = iter->second; + const HypoList &list = coll.GetSortedHypotheses(); + std::copy(list.begin(), list.end(), std::inserter(*ret, ret->end())); + } + return ret; +} + //! call GetSearchGraph() for each hypo collection void ChartCell::GetSearchGraph(long translationId, std::ostream &outputSearchGraphStream, const std::map<unsigned, bool> &reachable) const { |