diff options
| author | Alon Levy <alon@pobox.com> | 2014-11-03 18:13:07 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-11-03 18:13:09 +0200 |
| commit | 6f1ed70fa0583417cb630d8e733e856e6bfc666d (patch) | |
| tree | d30259f064afb801f65b175edcae20f9d4e3cd65 /scripts/textanalysis.js | |
| parent | de5ce9e401ff5d36e09228effd16d502f5a4a76a (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.
Diffstat (limited to 'scripts/textanalysis.js')
| -rw-r--r-- | scripts/textanalysis.js | 4 |
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 |
