summaryrefslogtreecommitdiff
path: root/rst_parser/rst_test.cc
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-04-02 23:49:30 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2012-04-02 23:49:30 -0400
commit2bd8136c89cf39d828087d38034eef72190dda08 (patch)
tree44223ae8a6e32758643cf5d0d0cc6811eda47d22 /rst_parser/rst_test.cc
parentbf4a7606151301dba49265e91c289f2caab2b7ec (diff)
make sure i don't break build by adding RST parser stubs
Diffstat (limited to 'rst_parser/rst_test.cc')
-rw-r--r--rst_parser/rst_test.cc33
1 files changed, 33 insertions, 0 deletions
diff --git a/rst_parser/rst_test.cc b/rst_parser/rst_test.cc
new file mode 100644
index 00000000..e8fe706e
--- /dev/null
+++ b/rst_parser/rst_test.cc
@@ -0,0 +1,33 @@
+#include "arc_factored.h"
+
+#include <iostream>
+
+using namespace std;
+
+int main(int argc, char** argv) {
+ // John saw Mary
+ // (H -> M)
+ // (1 -> 2) 20
+ // (1 -> 3) 3
+ // (2 -> 1) 20
+ // (2 -> 3) 30
+ // (3 -> 2) 0
+ // (3 -> 1) 11
+ // (0, 2) 10
+ // (0, 1) 9
+ // (0, 3) 9
+ ArcFactoredForest af(3);
+ af(1,2).edge_prob.logeq(20);
+ af(1,3).edge_prob.logeq(3);
+ af(2,1).edge_prob.logeq(20);
+ af(2,3).edge_prob.logeq(30);
+ af(3,2).edge_prob.logeq(0);
+ af(3,1).edge_prob.logeq(11);
+ af(0,2).edge_prob.logeq(10);
+ af(0,1).edge_prob.logeq(9);
+ af(0,3).edge_prob.logeq(9);
+ SpanningTree tree;
+ af.MaximumSpanningTree(&tree);
+ return 0;
+}
+