From 7e75878898d5c6d5686e27619fed8d2a44648cef Mon Sep 17 00:00:00 2001 From: inari Date: Tue, 10 Dec 2013 19:25:14 +0000 Subject: [PATCH] added weekdays and months to Construction, concrete in ConstructionFin Works like this: > p "perjantaisin" PhrUtt NoPConj (UttAdv (weekdayAdv friday)) NoVoc --- lib/src/abstract/Construction.gf | 13 +++++++++++++ lib/src/finnish/ConstructionFin.gf | 24 ++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/lib/src/abstract/Construction.gf b/lib/src/abstract/Construction.gf index cc2040d98..bab1f2085 100644 --- a/lib/src/abstract/Construction.gf +++ b/lib/src/abstract/Construction.gf @@ -13,6 +13,10 @@ abstract Construction = Cat ** { -- The first examples are from the MOLTO Phrasebook +cat + Weekday ; + Month ; + fun hungry_VP : VP ; -- x is hungry / x a faim (Fre) thirsty_VP : VP ; -- x is thirsty / x a soif (Fre) @@ -34,4 +38,13 @@ fun n_units_AP : Card -> CN -> A -> AP ; -- x inches long +-- weekdayN : Weekday -> N ; --weekdays are already as nouns in Dict +-- monthN : Month -> N --months are already as nouns in Dict + weekdayAdv : Weekday -> Adv ; + monthAdv : Month -> Adv ; + + monday,tuesday,wednesday,thursday,friday,sunday : Weekday ; + january,february,march,april,may,june,july : Month ; + august,september,october,november,december : Month ; + } diff --git a/lib/src/finnish/ConstructionFin.gf b/lib/src/finnish/ConstructionFin.gf index f0b3c4241..368c8c643 100644 --- a/lib/src/finnish/ConstructionFin.gf +++ b/lib/src/finnish/ConstructionFin.gf @@ -1,8 +1,10 @@ --# -path=alltenses:.:../abstract concrete ConstructionFin of Construction = CatFin ** - open SyntaxFin, ParadigmsFin, (L = LexiconFin), (E = ExtraFin), Prelude in { + open SyntaxFin, ParadigmsFin, (L = LexiconFin), (E = ExtraFin), (D = DictEngFin), Prelude in { +lincat + Weekday = {name : NP ; point : SyntaxFin.Adv ; habitual : SyntaxFin.Adv} ; lin hungry_VP = mkVP have_V2 (lin NP (mkNP (ParadigmsFin.mkN "nälkä"))) ; @@ -23,5 +25,23 @@ lin is_wrong_VP = mkVP (ParadigmsFin.mkAdv "väärässä") ; n_units_AP card cn a = mkAP (lin AdA (mkUtt (lin NP (mkNP (lin CN cn))))) (lin A a) ; - + + monday = mkDay D.monday_PN "maanantaisin" ; + tuesday = mkDay D.tuesday_PN "tiistaisin" ; + wednesday = mkDay D.wednesday_PN "keskiviikkoisin" ; + thursday = mkDay D.thursday_PN "torstaisin" ; + friday = mkDay D.friday_PN "perjantaisin" ; + saturday = mkDay D.saturday_PN "lauantaisin" ; + sunday = mkDay D.sunday_PN "sunnuntaisin" ; + + weekdayAdv w = w.point | w.habitual ; + +oper + + mkDay : PN -> Str -> Weekday = \d,s -> + let day = mkNP d in + lin Weekday {name = day ; + point = SyntaxFin.mkAdv (casePrep essive) day ; + habitual = ParadigmsFin.mkAdv s + } ; }