From 078b019b26c750fac166a8126193bf2580344f14 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Sun, 26 Oct 2014 21:14:08 +0200 Subject: textanalysis (#86): make star case avoid an empty string that was causing a chainlink temp node created from '' --- scripts/textanalysis.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/textanalysis.js') diff --git a/scripts/textanalysis.js b/scripts/textanalysis.js index aa7d2e04..e61bad6d 100644 --- a/scripts/textanalysis.js +++ b/scripts/textanalysis.js @@ -236,7 +236,10 @@ var textAnalyser2 = function (newtext, finalize) { } } - abnormalGraph = (newlinks.length - ANDcount) >= 3 || orderStack[orderStack.length - 1] != NODE; + abnormalGraph = (newlinks.length - ANDcount) >= 3 || + ((newlinks.length - ANDcount >= 1) && + orderStack.length > 1 && + orderStack[orderStack.length - 1] != NODE); //PREFIX not null case - put complete sentence in first link. if (prefix && !abnormalGraph) { -- cgit v1.3.1