mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
Moved punctuation to a separate field, to allow spoken language grammars to omit it. Created top-level spoken language grammars. (all in peacekeeping)
This commit is contained in:
@@ -1,6 +1,22 @@
|
||||
incomplete concrete PeaceCatI of PeaceCat = Cat ** open Cat in {
|
||||
incomplete concrete PeaceCatI of PeaceCat =
|
||||
Cat ** open Lang, PeaceRes, Prelude in {
|
||||
|
||||
lincat
|
||||
MassN = N ;
|
||||
Phrase = { s : Str; p : Punct } ;
|
||||
PhraseWritten = { s : Str } ;
|
||||
PhraseSpoken = { s : Str } ;
|
||||
|
||||
lin
|
||||
Written x = mkWritten x.s x.p ;
|
||||
Spoken x = { s = x.s } ;
|
||||
|
||||
oper
|
||||
mkWritten : Str -> Punct -> { s : Str } ;
|
||||
mkWritten x p = case p of {
|
||||
FullStop => { s = x ++ "." } ; --TFullStop (ss s) TEmpty ;
|
||||
QuestMark => { s = x ++ "?" } ; --TQuestMark (ss s) TEmpty ;
|
||||
ExclMark => { s = x ++ "!" } --TExclMark (ss s) TEmpty
|
||||
} ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user