mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
just for fun - grammar for trigram models in GF
This commit is contained in:
12
examples/trigram/TrigramCnc.gf
Normal file
12
examples/trigram/TrigramCnc.gf
Normal file
@@ -0,0 +1,12 @@
|
||||
concrete TrigramCnc of Trigram = {
|
||||
|
||||
lincat
|
||||
Word,Seq = Str;
|
||||
|
||||
Unigram, Bigram, Trigram, Prob = {} ;
|
||||
|
||||
lin
|
||||
nil a b c _ = a ++ b ++ c ;
|
||||
cons _ _ l c _ = l ++ c ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user