diff options
author | Phil Williams <philip.williams@mac.com> | 2015-09-25 14:11:23 +0300 |
---|---|---|
committer | Phil Williams <philip.williams@mac.com> | 2015-09-25 14:11:23 +0300 |
commit | 3c86649e34ab1458a7f5daa675fbb761afcfcef2 (patch) | |
tree | 00dc85fadd9b8730acca7c79a3692485767ab9cf /phrase-extract | |
parent | d2a6aa752e91ce62bd746a704b1a7e7534fdbb59 (diff) |
Fix bug in STSG rule scoring
Diffstat (limited to 'phrase-extract')
-rw-r--r-- | phrase-extract/extract-ghkm/Subgraph.cpp | 5 |
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); } |