diff --git a/lib/src/abstract/Construction.gf b/lib/src/abstract/Construction.gf index 5fbb8e82d..6cb5caf49 100644 --- a/lib/src/abstract/Construction.gf +++ b/lib/src/abstract/Construction.gf @@ -42,6 +42,9 @@ fun cup_of_CN : NP -> CN ; -- cup of tea / kupillinen teetä (Fin) glass_of_CN : NP -> CN ; +-- idiomatic expressions + few_X_short_of_Y : NP -> CN -> CN -> S ; -- NP is a few X's short of a Y / NP:llä ei ole kaikki X:t Y:ssä (Fin) + {- ---- postponed -- spatial deixis and motion verbs @@ -63,12 +66,15 @@ fun -- time expressions cat + Timeunit ; Weekday ; Month ; Monthday ; Year ; fun + timeunitAdv : Card -> Timeunit -> Adv ; -- (for) three hours + weekdayPunctualAdv : Weekday -> Adv ; -- on Monday weekdayHabitualAdv : Weekday -> Adv ; -- on Mondays weekdayLastAdv : Weekday -> Adv ; -- last Monday @@ -104,6 +110,14 @@ fun ---------------------------------------------- ---- lexicon of special names +fun second_Timeunit : Timeunit ; +fun minute_Timeunit : Timeunit ; +fun hour_Timeunit : Timeunit ; +fun day_Timeunit : Timeunit ; +fun week_Timeunit : Timeunit ; +fun month_Timeunit : Timeunit ; +fun year_Timeunit : Timeunit ; + fun monday_Weekday : Weekday ; fun tuesday_Weekday : Weekday ; fun wednesday_Weekday : Weekday ; diff --git a/lib/src/english/ConstructionEng.gf b/lib/src/english/ConstructionEng.gf index 9e9d211cf..8486fcc88 100644 --- a/lib/src/english/ConstructionEng.gf +++ b/lib/src/english/ConstructionEng.gf @@ -29,6 +29,12 @@ lin cup_of_CN np = mkCN (lin N2 (mkN2 "cup")) (lin NP np) ; glass_of_CN np = mkCN (lin N2 (mkN2 "glass")) (lin NP np) ; + few_X_short_of_Y np x y = + let + xs : Str = x.s ! R.Pl ! R.Nom ; + a_y : Str = (mkNP a_Det y).s ! R.NCase R.Nom ; + in + mkS (mkCl np (mkAdv ("a few" ++ xs ++ "short of" ++ a_y))) ; {- -- spatial deixis and motion verbs @@ -50,11 +56,17 @@ oper from_where_IAdv : IAdv = lin IAdv (ss "from where") ; lincat + Timeunit = N ; Weekday = N ; Monthday = NP ; Month = N ; Year = NP ; lin + timeunitAdv n time = + let n_card : Card = n ; + n_hours_NP : NP = mkNP n_card time ; + in SyntaxEng.mkAdv for_Prep n_hours_NP | mkAdv (n_hours_NP.s ! R.npNom) ; + weekdayPunctualAdv w = SyntaxEng.mkAdv on_Prep (mkNP w) ; -- on Sunday weekdayHabitualAdv w = SyntaxEng.mkAdv on_Prep (mkNP aPl_Det w) ; -- on Sundays weekdayNextAdv w = SyntaxEng.mkAdv (mkPrep "next") (mkNP w) ; -- next Sunday @@ -87,6 +99,14 @@ oper mkLanguage : Str -> PN = \s -> mkPN s ; ---------------------------------------------- ---- lexicon of special names +lin second_Timeunit = mkN "second" ; +lin minute_Timeunit = mkN "minute" ; +lin hour_Timeunit = mkN "hour" ; +lin day_Timeunit = mkN "day" ; +lin week_Timeunit = mkN "week" ; +lin month_Timeunit = mkN "month" ; +lin year_Timeunit = mkN "year" ; + lin monday_Weekday = mkN "Monday" ; lin tuesday_Weekday = mkN "Tuesday" ; lin wednesday_Weekday = mkN "Wednesday" ; diff --git a/lib/src/finnish/ConstructionFin.gf b/lib/src/finnish/ConstructionFin.gf index 412af667e..042e3f11a 100644 --- a/lib/src/finnish/ConstructionFin.gf +++ b/lib/src/finnish/ConstructionFin.gf @@ -28,6 +28,15 @@ lin cup_of_CN np = mkCN (lin N2 (mkN2 (mkN "kuppi") (mkPrep partitive))) (lin NP np) | mkCN (lin N2 (mkN2 (mkN "kupillinen") (mkPrep partitive))) (lin NP np) ; glass_of_CN np = mkCN (lin N2 (mkN2 (mkN "lasi") (mkPrep partitive))) (lin NP np) | mkCN (lin N2 (mkN2 (mkN "lasillinen") (mkPrep partitive))) (lin NP np) ; + + few_X_short_of_Y np x y = + let kaikki_xt : Str = (mkNP all_Predet ( mkNP aPl_Det x)).s ! R.NPCase R.Nom ; + yssa : Str = y.s ! R.NCase R.Sg R.Iness ; + kaikki_xt_yssa : Adv = ParadigmsFin.mkAdv (kaikki_xt ++ yssa) ; + olla_V : V = lin V have_V2 ; + in mkS negativePol + (mkCl np (mkVP (mkVP olla_V) kaikki_xt_yssa)) ; + {- where_go_QCl np = mkQCl (lin IAdv (ss "minne")) (mkCl np (mkVP L.go_V)) ; where_come_from_QCl np = mkQCl (lin IAdv (ss "mistä")) (mkCl np (mkVP L.come_V)) ; @@ -42,11 +51,13 @@ lin -} lincat + Timeunit = N ; Weekday = {noun : N ; habitual : SyntaxFin.Adv} ; Monthday = NP ; Month = N ; Year = NP ; lin + timeunitAdv n time = mkAdv ((mkNP time).s ! R.NPCase R.Nom) ; weekdayPunctualAdv w = lin Adv {s = pointWeekday w} ; weekdayHabitualAdv w = w.habitual ; @@ -88,6 +99,13 @@ oper mkWeekday : Str -> Weekday = \d -> } } ; +lin second_Timeunit = mkN "sekuntti" ; +lin minute_Timeunit = mkN "minuutti" ; +lin hour_Timeunit = mkN "tunti" ; +lin day_Timeunit = mkN "päivä" ; +lin week_Timeunit = mkN "viikko" ; +lin month_Timeunit = mkN "kuukausi" "kuukauden" "kuukausia" "kuukautta" ; +lin year_Timeunit = mkN "vuosi" "vuoden" "vuosia" "vuotta" ; lin monday_Weekday = mkWeekday "maanantai" ; lin tuesday_Weekday = mkWeekday "tiistai" ;