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 <hieu@hoang.co.uk>2013-10-02 20:43:59 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-10-02 20:43:59 +0400
commit1b12b0c4a24ffd78a08dd0053739b6497b8ce990 (patch)
treef1370e3ee87602f988eb678da09639f5b011060f /moses/WordLattice.h
parentbb511af0ee016646e9272a086cfe118efd7e1938 (diff)
correct creation of input paths for lattices
Diffstat (limited to 'moses/WordLattice.h')
-rw-r--r--moses/WordLattice.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/moses/WordLattice.h b/moses/WordLattice.h
index f9b20fc8e..3686281fd 100644
--- a/moses/WordLattice.h
+++ b/moses/WordLattice.h
@@ -1,6 +1,7 @@
#ifndef moses_WordLattice_h
#define moses_WordLattice_h
+#include <iostream>
#include <vector>
#include "ConfusionNet.h"
#include "PCNTools.h"
@@ -13,6 +14,7 @@ namespace Moses
*/
class WordLattice: public ConfusionNet
{
+ friend std::ostream& operator<<(std::ostream &out, const WordLattice &obj);
private:
std::vector<std::vector<size_t> > next_nodes;
std::vector<std::vector<int> > distances;
@@ -40,6 +42,9 @@ public:
*/
void GetAsEdgeMatrix(std::vector<std::vector<bool> >& edges) const;
+ const std::vector<size_t> &GetNextNodes(size_t pos) const
+ { return next_nodes[pos]; }
+
};
}