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:
-rw-r--r--phrase-extract/extract-ghkm/Subgraph.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/phrase-extract/extract-ghkm/Subgraph.cpp b/phrase-extract/extract-ghkm/Subgraph.cpp
index ef4b07200..e2e2f6c99 100644
--- a/phrase-extract/extract-ghkm/Subgraph.cpp
+++ b/phrase-extract/extract-ghkm/Subgraph.cpp
@@ -137,6 +137,11 @@ void Subgraph::RecursivelyPrintTree(const Node *n, std::ostream &out) const
for (std::vector<Node *>::const_iterator p(children.begin());
p != children.end(); ++p) {
Node *child = *p;
+ if (child->GetType() == SOURCE) {
+ // This is possible due to the heuristic for attaching unaligned
+ // source words.
+ continue;
+ }
out << " ";
RecursivelyPrintTree(child,out);
}