diff options
| author | Owen <despito@MacBook-Pro-de-Despito.local> | 2014-07-31 22:15:39 +0300 |
|---|---|---|
| committer | Owen <despito@MacBook-Pro-de-Despito.local> | 2014-07-31 22:15:39 +0300 |
| commit | e6e8f5fa56826b709142d623ce0689889673c1f1 (patch) | |
| tree | 7d7e01f7eb89c81240e10620ff51b0aa404184b4 /scripts/robot.js | |
| parent | ea3316bea21fa3b384951eab63fdafd19d7df5bb (diff) | |
All new text analysis engine,
multiple nodes
"and" triplets
new graph creation wheel
new rhizicore functions
Diffstat (limited to 'scripts/robot.js')
| -rw-r--r-- | scripts/robot.js | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/scripts/robot.js b/scripts/robot.js index 3292b51f..d0c7ef8b 100644 --- a/scripts/robot.js +++ b/scripts/robot.js @@ -1,13 +1,11 @@ var sentence=""; -/*sentence+="#Rhizibot is showing you a #tutorial "; -sentence+="#Rhizi visualizes data with #Graphs "; -sentence+="#Graphs are great to display #relationships "; -sentence+="#nodes are #entities "; -sentence+="#nodes are #concepts "; -sentence+="#entities can be #concepts "; -sentence+="#concepts have context with #relationships "; -sentence+="We built this entire graph in 30 seconds, try it out yourself!";*/ +sentence+=" #Rhizibot is showing you a #tutorial|"; +sentence+="#Rhizi visualizes data with #Graphs and #relationships|"; +sentence+="#links and #nodes have #context and #meaning|"; +sentence+="#entities and #concepts are #nodes|"; +sentence+="We built this entire graph in 30 seconds, try it out yourself!"; +/* sentence=""; var arr=["works on","contibutes to","likes","knows","is an expert at","donates to"]; var arr2=["is used by","is liked by","employs"]; @@ -18,12 +16,13 @@ for(var a=0;a<10;a++){ sentence+="#"+sugg[Math.floor(Math.random()*sugg.length)]+" "+arr2[Math.round(Math.random()*2)]+" #"+names[Math.floor(Math.random()*names.length)]+" "; } -} +}*/ + var counter=0; var sentencecounter=0; var robot; -var speed=9; +var speed=2; $('.logo').click(function(){ setTimeout( Robot, 1000 ); @@ -43,19 +42,22 @@ function Robot(){ if(counter<=sentence.length){ var text=$('#textanalyser').val(); - + counter++; + if(sentence.charAt(counter)!=="|"){ $('#textanalyser').val(text+sentence.charAt(counter)); - if(Math.random()>0.9)graph.editType("x","temp",nodetypes[Math.round(Math.random()*4)]); - counter++; - if(sentence.charAt(counter)==="#"){ + //if(Math.random()>0.9)graph.editType("x","temp",nodetypes[Math.round(Math.random()*4)]); + if(sentence.charAt(counter)==="#"){ sentencecounter++; - if(sentencecounter%2===0)window.setTimeout( Robot, 650/speed ); - else window.setTimeout( Robot, 30/speed+Math.random()*160/speed ); + window.setTimeout( Robot, 30/speed+Math.random()*160/speed ); }else{ window.setTimeout( Robot, 50/speed+Math.round(Math.random()*100/speed) ); } }else{ + $('#textanalyser').trigger("submit"); + window.setTimeout( Robot, 650/speed ); + } + }else{ window.clearInterval(robot); } |
