PhrasebookLav: few more improvements

- Alternative variants in AScared.
- The order of adv. modifiers: first time, then place (PSeeYouPlaceDate).
- Fixed: the object valence in QWhatAge; Day.point linearization.
- PSeeYouPlaceDate is now less formal.
- Open/Closed and SeeYou functions are ok now, except that the word order in Open/Closed is a bit clumsy. TODO: "<what> <when> is open/closed" (currently not supported by the RG).
This commit is contained in:
Normunds Gruzitis
2012-10-08 07:30:16 +00:00
parent a838a855d1
commit b6c589afac
2 changed files with 17 additions and 15 deletions

View File

@@ -38,9 +38,6 @@ in {
YouPlurFamFemale, YouPlurPolFemale = mkPerson youPl8fem_Pron ; YouPlurFamFemale, YouPlurPolFemale = mkPerson youPl8fem_Pron ;
TheyFemale = mkPerson they8fem_Pron ; TheyFemale = mkPerson they8fem_Pron ;
--AHaveCurr p curr = mkCl p.name have_V2 (mkNP aPl_Det curr) ;
--AHaveCurr p curr = mkCl (mkVP have_V3 (mkNP aPl_Det curr) p.name) ;
oper oper
NPLanguage : Type = {lang : NP ; modif : Adv} ; NPLanguage : Type = {lang : NP ; modif : Adv} ;
NPNationality : Type = {lang : NPLanguage ; country : NP ; prop : A} ; NPNationality : Type = {lang : NPLanguage ; country : NP ; prop : A} ;

View File

@@ -8,7 +8,8 @@ open
(L = LexiconLav), (L = LexiconLav),
ExtraLav, ExtraLav,
ResLav, ResLav,
Prelude Prelude,
Predef
in { in {
flags flags
@@ -142,7 +143,10 @@ in {
ALove p q = mkCl p.name L.love_V2 q.name ; ALove p q = mkCl p.name L.love_V2 q.name ;
AMarried p = mkCl p.name (mkA (mkV "precēties" third_conjugation)) ; AMarried p = mkCl p.name (mkA (mkV "precēties" third_conjugation)) ;
AReady p = mkCl p.name (mkA "gatavs") ; AReady p = mkCl p.name (mkA "gatavs") ;
AScared p = mkCl p.name (mkA (mkV "nobīties" "nobīstos" "nobijos")) ;
AScared p =
mkCl p.name (mkV "baidīties" third_conjugation) |
mkCl p.name (mkA (mkV "nobīties" "nobīstos" "nobijos")) ;
ASpeak p lang = ASpeak p lang =
mkCl p.name (mkVP (mkVP (mkV "runāt" second_conjugation)) lang.modif) | mkCl p.name (mkVP (mkVP (mkV "runāt" second_conjugation)) lang.modif) |
@@ -157,16 +161,17 @@ in {
AWantGo p place = mkCl p.name (mkVV (mkV "vēlēties" third_conjugation)) (mkVP (mkVP (mkV "doties" "dodos" "devos")) place.to) ; AWantGo p place = mkCl p.name (mkVV (mkV "vēlēties" third_conjugation)) (mkVP (mkVP (mkV "doties" "dodos" "devos")) place.to) ;
---- mkVV by AR 28/8/2012 ---- mkVV by AR 28/8/2012
-- Quick & dirty -- Quick & dirty, or ok?
QWhatName p = mkQS (mkQCl how_IAdv (mkCl p.name (mkV2 (mkV "saukt" "saucu" "saucu") nom_Prep Acc) (mkNP (mkN [])))) ; QWhatName p = mkQS (mkQCl how_IAdv (mkCl p.name (mkV2 (mkV "saukt" "saucu" "saucu") nom_Prep Acc) (mkNP (mkN [])))) ;
-- Quick & dirty -- Quick & dirty
-- TODO: how8much_IAdv >>> how8many_IDet (but the word order!) or how8many_IAdv -- TODO: how8much_IAdv >>> how8many_IDet (but the word order!) or how8many_IAdv
-- mkNP a_Quant pluralNum L.year_N >>> mkNP pluralNum L.year_N -- mkNP a_Quant pluralNum L.year_N >>> mkNP pluralNum L.year_N
QWhatAge p = mkQS (mkQCl how8much_IAdv (mkCl p.name have_V2 (mkNP a_Quant pluralNum L.year_N))) ; -- Cannot use have_V2 because of a different valence
QWhatAge p = mkQS (mkQCl how8much_IAdv (mkCl p.name (mkV2 (mkV "būt") gen_Prep Dat) (mkNP the_Quant pluralNum L.year_N))) ;
-- Quick & dirty -- Quick & dirty
-- TODO: use NP -> V -> Cl, changing the default word order -- TODO: item is the subject >>> use NP -> V -> Cl (changing the default word order)
HowMuchCost item = mkQS (mkQCl how8much_IAdv (mkCl (mkVP (mkV2 (mkV "maksāt" second_conjugation) nom_Prep) item))) ; HowMuchCost item = mkQS (mkQCl how8much_IAdv (mkCl (mkVP (mkV2 (mkV "maksāt" second_conjugation) nom_Prep) item))) ;
ItCost item price = mkCl item (mkV2 (mkV "maksāt" second_conjugation) acc_Prep) price ; ItCost item price = mkCl item (mkV2 (mkV "maksāt" second_conjugation) acc_Prep) price ;
@@ -180,9 +185,10 @@ in {
-- Building phrases from strings is complicated: the solution is to use -- Building phrases from strings is complicated: the solution is to use
-- mkText : Text -> Text -> Text ; -- mkText : Text -> Text -> Text ;
PSeeYouDate d = mkText (lin Text (ss ("uz tikšanos"))) (mkPhrase (mkUtt d)) ; PSeeYouDate d = mkText (lin Text (ss ("tiksimies"))) (mkPhrase (mkUtt d)) ;
PSeeYouPlace p = mkText (lin Text (ss ("uz tikšanos"))) (mkPhrase (mkUtt p.at)) ; PSeeYouPlace p = mkText (lin Text (ss ("tiksimies"))) (mkPhrase (mkUtt p.at)) ;
PSeeYouPlaceDate p d = mkText (lin Text (ss ("uz tikšanos"))) (mkText (mkPhrase (mkUtt p.at)) (mkPhrase (mkUtt d))) ; PSeeYouPlaceDate p d = mkText (lin Text (ss ("tiksimies"))) (mkText (mkPhrase (mkUtt d)) (mkPhrase (mkUtt p.at))) ;
-- Relations are expressed as "my wife" or "my son's wife", as defined by $xOf$ -- Relations are expressed as "my wife" or "my son's wife", as defined by $xOf$
-- below. Languages without productive genitives must use an equivalent of -- below. Languages without productive genitives must use an equivalent of
-- "the wife of my son" for non-pronouns. -- "the wife of my son" for non-pronouns.
@@ -231,10 +237,9 @@ in {
mkNPNationality (mkLang la mo) (mkNP co) la ; mkNPNationality (mkLang la mo) (mkNP co) la ;
mkDay : Str -> NPDay = \d -> mkDay : Str -> NPDay = \d ->
let day : NP = mkNP (mkPN d) in mkNPDay (mkNP (mkPN d))
mkNPDay day (mkAdv (Predef.tk 1 d))
(SyntaxLav.mkAdv in_Prep day) (SyntaxLav.mkAdv in_Prep (mkNP the_Quant plNum (mkCN (mkN d)))) ;
(SyntaxLav.mkAdv in_Prep (mkNP a_Quant plNum (mkCN (mkN d)))) ;
--mkCompoundPlace : Str -> Str -> Prep -> { --mkCompoundPlace : Str -> Str -> Prep -> {
-- name : CN ; -- name : CN ;