summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/textanalysis.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/textanalysis.js b/scripts/textanalysis.js
index c9beb4aa..8a591460 100644
--- a/scripts/textanalysis.js
+++ b/scripts/textanalysis.js
@@ -155,9 +155,9 @@ function TextAnalyser2(newtext, finalize) {
quoteword = "";
do {
quoteword += subsegment[k] + " ";
- k++;
+ if(subsegment[k].charAt(subsegment[k].length-1) !== '"')k++;
} while (k < subsegment.length && subsegment[k].charAt(subsegment[k].length - 1) !== '"');
- if (k < subsegment.length) quoteword += subsegment[k];
+ if(subsegment[k])if(subsegment[k]!==quoteword.replace(/ /g, ""))quoteword += subsegment[k];
sentence.push(quoteword.replace(/"/g, ""));
} else {
sentence.push(subsegment[k]);
@@ -315,7 +315,6 @@ function TextAnalyser2(newtext, finalize) {
graph.addLink(newnodes[y],node,verb,typesetter);
for(var z=x; z<newnodes.length ;z++){
graph.addLink(newnodes[y],newnodes[z],verb,typesetter);
- console.log(newnodes[y]+ " and "+newnodes[z]);
}
}