forked from GitHub/gf-core
a compilable stub of PhrasebookJpn. Sent to a native speaker expert for completions.
This commit is contained in:
36
examples/phrasebook/SentencesJpn.gf
Normal file
36
examples/phrasebook/SentencesJpn.gf
Normal file
@@ -0,0 +1,36 @@
|
||||
concrete SentencesJpn of Sentences = NumeralJpn **
|
||||
SentencesI - [
|
||||
VDrink,VEat,VRead,VWait,VWrite,
|
||||
phrasePlease, mkSentence, mkPhrase,
|
||||
NameNN,
|
||||
PSentence, PQuestion, GObjectPlease
|
||||
|
||||
]
|
||||
with
|
||||
(Syntax = SyntaxJpn),
|
||||
-- (Symbolic = SymbolicJpn),
|
||||
(Lexicon = LexiconJpn) ** open SyntaxJpn, ParadigmsJpn in {
|
||||
|
||||
lin
|
||||
VDrink = v2toVP drink_V2 ;
|
||||
VEat = v2toVP eat_V2 ;
|
||||
VRead = v2toVP read_V2 ;
|
||||
VWait = v2toVP wait_V2 ;
|
||||
VWrite = v2toVP write_V2 ;
|
||||
|
||||
NameNN = mkNP (mkPN "NN") ;
|
||||
|
||||
PSentence s = mkText (mkPhr (mkUtt s)) | lin Text (mkPhr (mkUtt s)) ; -- optional '.'
|
||||
PQuestion s = mkText (mkPhr (mkUtt s)) | lin Text (mkPhr (mkUtt s)) ; -- optional '?'
|
||||
|
||||
GObjectPlease o = lin Text (mkPhr noPConj (mkUtt o) please_Voc) | lin Text (mkPhr (mkUtt o)) ;
|
||||
|
||||
oper
|
||||
v2toVP : V2 -> VP = \v2 -> mkVP <lin V (v2 ** {needSubject = True}) : V> ;
|
||||
|
||||
phrasePlease : Utt -> Text = \u -> lin Text (mkPhr u) | lin Text (mkPhr noPConj u please_Voc) ;
|
||||
|
||||
mkPhrase : Utt -> Text = \u -> lin Text (mkPhr u) ; -- no punctuation
|
||||
mkSentence : Utt -> Text = \t -> lin Text (postfixSS "." (mkPhr t) | (mkPhr t)) ; -- optional .
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user