forked from GitHub/gf-core
add constructions to English and Finnish
This commit is contained in:
@@ -42,6 +42,9 @@ fun
|
|||||||
cup_of_CN : NP -> CN ; -- cup of tea / kupillinen teetä (Fin)
|
cup_of_CN : NP -> CN ; -- cup of tea / kupillinen teetä (Fin)
|
||||||
glass_of_CN : NP -> CN ;
|
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
|
---- postponed
|
||||||
-- spatial deixis and motion verbs
|
-- spatial deixis and motion verbs
|
||||||
@@ -63,12 +66,15 @@ fun
|
|||||||
-- time expressions
|
-- time expressions
|
||||||
|
|
||||||
cat
|
cat
|
||||||
|
Timeunit ;
|
||||||
Weekday ;
|
Weekday ;
|
||||||
Month ;
|
Month ;
|
||||||
Monthday ;
|
Monthday ;
|
||||||
Year ;
|
Year ;
|
||||||
|
|
||||||
fun
|
fun
|
||||||
|
timeunitAdv : Card -> Timeunit -> Adv ; -- (for) three hours
|
||||||
|
|
||||||
weekdayPunctualAdv : Weekday -> Adv ; -- on Monday
|
weekdayPunctualAdv : Weekday -> Adv ; -- on Monday
|
||||||
weekdayHabitualAdv : Weekday -> Adv ; -- on Mondays
|
weekdayHabitualAdv : Weekday -> Adv ; -- on Mondays
|
||||||
weekdayLastAdv : Weekday -> Adv ; -- last Monday
|
weekdayLastAdv : Weekday -> Adv ; -- last Monday
|
||||||
@@ -104,6 +110,14 @@ fun
|
|||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
---- lexicon of special names
|
---- 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 monday_Weekday : Weekday ;
|
||||||
fun tuesday_Weekday : Weekday ;
|
fun tuesday_Weekday : Weekday ;
|
||||||
fun wednesday_Weekday : Weekday ;
|
fun wednesday_Weekday : Weekday ;
|
||||||
|
|||||||
@@ -29,6 +29,12 @@ lin
|
|||||||
cup_of_CN np = mkCN (lin N2 (mkN2 "cup")) (lin NP np) ;
|
cup_of_CN np = mkCN (lin N2 (mkN2 "cup")) (lin NP np) ;
|
||||||
glass_of_CN np = mkCN (lin N2 (mkN2 "glass")) (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
|
-- spatial deixis and motion verbs
|
||||||
|
|
||||||
@@ -50,11 +56,17 @@ oper from_where_IAdv : IAdv = lin IAdv (ss "from where") ;
|
|||||||
|
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
|
Timeunit = N ;
|
||||||
Weekday = N ;
|
Weekday = N ;
|
||||||
Monthday = NP ;
|
Monthday = NP ;
|
||||||
Month = N ;
|
Month = N ;
|
||||||
Year = NP ;
|
Year = NP ;
|
||||||
lin
|
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
|
weekdayPunctualAdv w = SyntaxEng.mkAdv on_Prep (mkNP w) ; -- on Sunday
|
||||||
weekdayHabitualAdv w = SyntaxEng.mkAdv on_Prep (mkNP aPl_Det w) ; -- on Sundays
|
weekdayHabitualAdv w = SyntaxEng.mkAdv on_Prep (mkNP aPl_Det w) ; -- on Sundays
|
||||||
weekdayNextAdv w = SyntaxEng.mkAdv (mkPrep "next") (mkNP w) ; -- next Sunday
|
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
|
---- 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 monday_Weekday = mkN "Monday" ;
|
||||||
lin tuesday_Weekday = mkN "Tuesday" ;
|
lin tuesday_Weekday = mkN "Tuesday" ;
|
||||||
lin wednesday_Weekday = mkN "Wednesday" ;
|
lin wednesday_Weekday = mkN "Wednesday" ;
|
||||||
|
|||||||
@@ -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) ;
|
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) ;
|
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_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)) ;
|
where_come_from_QCl np = mkQCl (lin IAdv (ss "mistä")) (mkCl np (mkVP L.come_V)) ;
|
||||||
@@ -42,11 +51,13 @@ lin
|
|||||||
-}
|
-}
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
|
Timeunit = N ;
|
||||||
Weekday = {noun : N ; habitual : SyntaxFin.Adv} ;
|
Weekday = {noun : N ; habitual : SyntaxFin.Adv} ;
|
||||||
Monthday = NP ;
|
Monthday = NP ;
|
||||||
Month = N ;
|
Month = N ;
|
||||||
Year = NP ;
|
Year = NP ;
|
||||||
lin
|
lin
|
||||||
|
timeunitAdv n time = mkAdv ((mkNP <lin Card n : Card> time).s ! R.NPCase R.Nom) ;
|
||||||
|
|
||||||
weekdayPunctualAdv w = lin Adv {s = pointWeekday w} ;
|
weekdayPunctualAdv w = lin Adv {s = pointWeekday w} ;
|
||||||
weekdayHabitualAdv w = w.habitual ;
|
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 monday_Weekday = mkWeekday "maanantai" ;
|
||||||
lin tuesday_Weekday = mkWeekday "tiistai" ;
|
lin tuesday_Weekday = mkWeekday "tiistai" ;
|
||||||
|
|||||||
Reference in New Issue
Block a user