summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-10-13 14:21:17 +0300
committerAlon Levy <alon@pobox.com>2014-10-19 11:36:06 +0300
commitb38fe801203e82da55302392be5c16ff79acae6f (patch)
tree2be7ea6df765d2ffa74ede4249dda9971a7cd917 /tests
parent2a4eed8ad7128257b4140355bfb8a4a5121bb3bf (diff)
[wip] tests/test_analyzer #82
Diffstat (limited to 'tests')
-rw-r--r--tests/test_analyzer.js23
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/test_analyzer.js b/tests/test_analyzer.js
index 874eb9c3..b7b66a66 100644
--- a/tests/test_analyzer.js
+++ b/tests/test_analyzer.js
@@ -51,9 +51,28 @@ function dump_graphviz(window) {
console.log('}');
}
+var data = [
+["#a hello there #b", ["a", "b"], [["a", "b", "hello there"]],
+["#a hello there2 #ba", ["a", "ba"], ["a", "ba", "hello there2"]]],
+["#c and #d like #e", ["c", "d", "e"], [["c", "e", "like"], ["d", "e", "like"]]],
+["#f and #g and #h are cool", ["f", "g", "h", "are cool"], [["f", "are cool", ""], ["g", "are cool", ""], ["h", "are cool", ""]]], // the are should be a label actually, but harder to do.
+["#i likes #j and #k", ["i", "j", "k"], ["i", "j", "likes"], ["i", "k", "likes"]],
+["#q likes #r but doesn't like #l", ["q", "r", "l"], []],
+];
+/*
+#t and #u like #v
+#w #x #y
+sometimes #z and #ab aren't friends
+I like to work with #a
+*/
+
+
var done = function (errors, window) {
- window.analyzeSentence(process.argv.slice(2).join(" "), true);
- dump_graphviz(window);
+ debugger;
+ if (process.argv.length > 2) {
+ window.analyzeSentence(process.argv.slice(2).join(" "), true);
+ dump_graphviz(window);
+ }
process.exit();
}