mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 08:32:50 -06:00
added weekdays and months to Construction, concrete in ConstructionFin
Works like this: > p "perjantaisin" PhrUtt NoPConj (UttAdv (weekdayAdv friday)) NoVoc
This commit is contained in:
@@ -13,6 +13,10 @@ abstract Construction = Cat ** {
|
|||||||
|
|
||||||
-- The first examples are from the MOLTO Phrasebook
|
-- The first examples are from the MOLTO Phrasebook
|
||||||
|
|
||||||
|
cat
|
||||||
|
Weekday ;
|
||||||
|
Month ;
|
||||||
|
|
||||||
fun
|
fun
|
||||||
hungry_VP : VP ; -- x is hungry / x a faim (Fre)
|
hungry_VP : VP ; -- x is hungry / x a faim (Fre)
|
||||||
thirsty_VP : VP ; -- x is thirsty / x a soif (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
|
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 ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
--# -path=alltenses:.:../abstract
|
--# -path=alltenses:.:../abstract
|
||||||
|
|
||||||
concrete ConstructionFin of Construction = CatFin **
|
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
|
lin
|
||||||
hungry_VP = mkVP have_V2 (lin NP (mkNP (ParadigmsFin.mkN "nälkä"))) ;
|
hungry_VP = mkVP have_V2 (lin NP (mkNP (ParadigmsFin.mkN "nälkä"))) ;
|
||||||
@@ -24,4 +26,22 @@ lin
|
|||||||
|
|
||||||
n_units_AP card cn a = mkAP (lin AdA (mkUtt (lin NP (mkNP <lin Card card : Card> (lin CN cn))))) (lin A a) ;
|
n_units_AP card cn a = mkAP (lin AdA (mkUtt (lin NP (mkNP <lin Card card : Card> (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
|
||||||
|
} ;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user