summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-11-03 18:13:07 +0200
committerAlon Levy <alon@pobox.com>2014-11-03 18:13:09 +0200
commit6f1ed70fa0583417cb630d8e733e856e6bfc666d (patch)
treed30259f064afb801f65b175edcae20f9d4e3cd65
parentde5ce9e401ff5d36e09228effd16d502f5a4a76a (diff)
Fixes #119
It's a bit ugly. In that it uses the explicit string 'and' to avoid creating those links. But that was the wording of the request. In general we are missing an AST step. That would let us switch between '#' and ' ' much more cleanly.
-rw-r--r--scripts/textanalysis.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/textanalysis.js b/scripts/textanalysis.js
index 21cf037b..f31a13ba 100644
--- a/scripts/textanalysis.js
+++ b/scripts/textanalysis.js
@@ -403,7 +403,9 @@ var textAnalyser2 = function (newtext, finalize) {
}
for (k in ret.links) {
l = ret.links[k];
- graph.addLinkByName(l.sourceName, l.targetName, l.name, l.state, ret.drop_conjugator_links);
+ if (!finalize || l.name !== 'and') {
+ graph.addLinkByName(l.sourceName, l.targetName, l.name, l.state, ret.drop_conjugator_links);
+ }
}
}
//UPDATE GRAPH ONCE