summaryrefslogtreecommitdiff
path: root/scripts/textanalysis.js
diff options
context:
space:
mode:
authorOwen <despito@MacBook-Pro-de-Despito.local>2014-08-13 17:07:38 +0300
committerOwen <despito@MacBook-Pro-de-Despito.local>2014-08-13 17:07:38 +0300
commit50abd6a9f295d349b447535edc0a147f690b042d (patch)
tree021617e0da8c601af173608d842890e2683093fc /scripts/textanalysis.js
parentd1e45cb485c28afbef6b5e57adb1683dba04a53d (diff)
Issue #35
Diffstat (limited to 'scripts/textanalysis.js')
-rw-r--r--scripts/textanalysis.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/textanalysis.js b/scripts/textanalysis.js
index f61d9df6..c9beb4aa 100644
--- a/scripts/textanalysis.js
+++ b/scripts/textanalysis.js
@@ -214,7 +214,11 @@ function TextAnalyser2(newtext, finalize) {
for (var m = 0; m < orderStack.length; m++) {
if (orderStack[m] === "NODE") {
word += " (" + newnodes[nodeindex] + ") ";
- completeSentence += newnodes[nodeindex] + " ";
+ if(newnodes[nodeindex].split(" ").length>1){
+ completeSentence += '"'+newnodes[nodeindex]+'"' + " ";
+ }else{
+ completeSentence += newnodes[nodeindex] + " ";
+ }
nodeindex++;
} else if (orderStack[m] === "LINK") {
linkindex++;
@@ -233,7 +237,12 @@ function TextAnalyser2(newtext, finalize) {
typesetter = "perm";
for (var n = 0; n < newnodes.length; n++) {
if (Unique(newnodes[n])) {
- sugg.push(newnodes[n]);
+ if(newnodes[n].split(" ").length>1){
+ sugg.push('"'+newnodes[n]+'"');
+ }else{
+ sugg.push(newnodes[n]);
+ }
+
}
}
sugg.push(text);