1
0
forked from GitHub/gf-core

a compilable stub of PhrasebookJpn. Sent to a native speaker expert for completions.

This commit is contained in:
aarne
2014-11-15 09:43:15 +00:00
parent c707575bd7
commit 4b075da678
5 changed files with 389 additions and 2 deletions

View 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 .
}