--- /dev/null
+#!/usr/bin/env bash
+
+# The example shows off some of the REPL's data loading commands.
+
+echo '
+load rules_tsv = tsv("test/repl/papa.gr").
+load token = loadmat("test/repl/sentences.txt", astype=str).
+' |./dyna test/repl/load.dyna -i
+
+#load tree_sexpr = sexpr("trees.txt", binarize=True)
--- /dev/null
+% accompanies load.bash
+
+% binary rules
+rewrite(X, Y, Z) :=
+ rules_tsv(Linenum, Cost, X, R),
+ List is pycall("split", R, "\\s+"),
+ cons(Y, &cons(Z, &nil)) is List,
+ pycall("float", Cost).
+
+% load unary rules
+rewrite(X, Y) :=
+ rules_tsv(Linenum, Cost, X, R),
+ cons(Y, &nil) is pycall("split", R, "\\s+"),
+ pycall("float", Cost).
+
+phrase(S,X,I,K) += phrase(S,Y,I,K) + rewrite(X,Y).
+phrase(S,X,I,K) += phrase(S,Y,I,J) + phrase(S,Z,J,K) + rewrite(X,Y,Z).
+phrase(S,W,I,I+1) += W is token(S,I), 0.
+
+sentence_length(S) max= token(S,I), I+1.
+goal(S) += phrase(S, "S", 0, sentence_length(S)).