summaryrefslogtreecommitdiff
path: root/examples/trigram/Trigram.gf
diff options
context:
space:
mode:
Diffstat (limited to 'examples/trigram/Trigram.gf')
-rw-r--r--examples/trigram/Trigram.gf5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/trigram/Trigram.gf b/examples/trigram/Trigram.gf
index 2e6e18fdd..0ad99b0bf 100644
--- a/examples/trigram/Trigram.gf
+++ b/examples/trigram/Trigram.gf
@@ -1,6 +1,9 @@
abstract Trigram = {
cat
+ -- A sentence
+ S ;
+
-- A lexicon is a set of 'Word's
Word ;
@@ -17,6 +20,8 @@ cat
Prob (a,b,c : Word) ;
data
+ sent : ({a,b} : Word) -> Seq a b -> S ;
+
-- Here we construct sequence by using nil and cons. The Prob argument ensures
-- that the sequence contains only valid N-grams and contributes with the right
-- probability mass