From 3c86649e34ab1458a7f5daa675fbb761afcfcef2 Mon Sep 17 00:00:00 2001 From: Phil Williams Date: Fri, 25 Sep 2015 12:11:23 +0100 Subject: Fix bug in STSG rule scoring --- phrase-extract/extract-ghkm/Subgraph.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'phrase-extract') 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::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); } -- cgit v1.2.3