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>2012-11-13 21:43:52 +0400
committerHieu Hoang <hieuhoang@gmail.com>2012-11-13 21:43:52 +0400
commitbc64acaaa4bb5d3e0200e68186d14c398ae57c7f (patch)
tree6ffe4cf7af41bbae4a176d6c03ae1545efdfb63c /moses/ChartCell.cpp
parentf8e185602296fcff8ea90c44d4a754fcb75d7809 (diff)
remove hardcoded label for top of sentence
Diffstat (limited to 'moses/ChartCell.cpp')
-rw-r--r--moses/ChartCell.cpp13
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
{