mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
coercions from special categories in Construction to N and PN
This commit is contained in:
@@ -35,11 +35,14 @@ fun
|
||||
n_units_AP : Card -> CN -> A -> AP ; -- x inches long
|
||||
n_units_of_NP : Card -> CN -> NP -> NP ; -- x ounces of this flour
|
||||
|
||||
|
||||
-- containers
|
||||
bottle_of_CN : NP -> CN ; -- bottle of beer / flaska öl (Swe)
|
||||
cup_of_CN : NP -> CN ; -- cup of tea / kupillinen teetä (Fin)
|
||||
glass_of_CN : NP -> CN ;
|
||||
|
||||
|
||||
{-
|
||||
---- postponed
|
||||
-- spatial deixis and motion verbs
|
||||
-- verbs like `walk' or `run' can take both: there or to there
|
||||
|
||||
@@ -54,6 +57,8 @@ fun
|
||||
come_there_VP : VP ; -- X came there / X tuli sinne (Fin)
|
||||
come_from_there_VP : VP ; -- X came from there / X tuli sieltä (Fin)
|
||||
|
||||
-}
|
||||
|
||||
-- time expressions
|
||||
|
||||
cat
|
||||
@@ -63,8 +68,6 @@ cat
|
||||
Year ;
|
||||
|
||||
fun
|
||||
-- weekdayN : Weekday -> N ; --weekdays are already as nouns in Dict
|
||||
-- monthN : Month -> N --months are already as nouns in Dict
|
||||
weekdayPunctualAdv : Weekday -> Adv ; -- on Monday
|
||||
weekdayHabitualAdv : Weekday -> Adv ; -- on Mondays
|
||||
weekdayLastAdv : Weekday -> Adv ; -- last Monday
|
||||
@@ -85,6 +88,12 @@ fun
|
||||
cat
|
||||
Language ;
|
||||
fun
|
||||
InLanguage : Language -> Adv ;
|
||||
InLanguage : Language -> Adv ; -- in English, auf englisch, englanniksi, etc
|
||||
|
||||
-- coercions to RGL categories
|
||||
|
||||
weekdayN : Weekday -> N ;
|
||||
monthN : Month -> N ;
|
||||
languagePN : Language -> PN ;
|
||||
|
||||
}
|
||||
|
||||
@@ -48,5 +48,9 @@ lincat Language = PN ;
|
||||
|
||||
lin InLanguage l = SyntaxChi.mkAdv (mkPrep "在") (mkNP l) ;
|
||||
|
||||
lin
|
||||
weekdayN w = w ;
|
||||
monthN m = m ;
|
||||
languagePN l = l ;
|
||||
|
||||
}
|
||||
|
||||
@@ -24,10 +24,12 @@ lin
|
||||
|
||||
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) (lin A a) ;
|
||||
|
||||
|
||||
bottle_of_CN np = mkCN (lin N2 (mkN2 "bottle")) (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) ;
|
||||
|
||||
{-
|
||||
-- spatial deixis and motion verbs
|
||||
|
||||
where_go_QCl np = mkQCl where_IAdv (mkCl np (mkVP L.go_V)) ;
|
||||
@@ -44,6 +46,9 @@ lin
|
||||
--TODO "where did X come from" instead of "from where did X come"
|
||||
oper from_where_IAdv : IAdv = lin IAdv (ss "from where") ;
|
||||
|
||||
-}
|
||||
|
||||
|
||||
lincat
|
||||
Weekday = N ;
|
||||
Monthday = NP ;
|
||||
@@ -68,5 +73,9 @@ lincat Language = PN ;
|
||||
|
||||
lin InLanguage l = SyntaxEng.mkAdv in_Prep (mkNP l) ;
|
||||
|
||||
lin
|
||||
weekdayN w = w ;
|
||||
monthN m = m ;
|
||||
languagePN l = l ;
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ 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) ;
|
||||
|
||||
{-
|
||||
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)) ;
|
||||
|
||||
@@ -37,6 +38,7 @@ lin
|
||||
go_there_VP = mkVP (mkVP L.go_V) (mkAdv "sinne") ;
|
||||
come_there_VP = mkVP (mkVP L.come_V) (mkAdv "sinne") ;
|
||||
come_from_there_VP = mkVP (mkVP L.come_V) (mkAdv "sieltä") ;
|
||||
-}
|
||||
|
||||
lincat
|
||||
Weekday = {noun : N ; habitual : SyntaxFin.Adv} ;
|
||||
@@ -67,6 +69,10 @@ lincat Language = PN ;
|
||||
|
||||
lin InLanguage l = SyntaxFin.mkAdv (mkPrep translative) (mkNP l) ;
|
||||
|
||||
lin
|
||||
weekdayN w = w ;
|
||||
monthN m = m ;
|
||||
languagePN l = l ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ lin
|
||||
cup_of_CN np = mkCN (lin N2 (mkN2 (mkN "tasse") part_Prep)) np ;
|
||||
glass_of_CN np = mkCN (lin N2 (mkN2 (mkN "verre") part_Prep)) np ;
|
||||
|
||||
|
||||
{-
|
||||
-- spatial deixis and motion verbs
|
||||
|
||||
where_go_QCl np = mkQCl where_IAdv (mkCl np (mkVP L.go_V)) ;
|
||||
@@ -43,7 +43,8 @@ lin
|
||||
go_there_VP = mkVP (mkVP L.go_V) there_Adv ;
|
||||
come_there_VP = mkVP (mkVP L.come_V) there_Adv ;
|
||||
come_from_there_VP = mkVP (mkVP L.come_V) (mkAdv "de là") ;
|
||||
|
||||
-}
|
||||
|
||||
lincat
|
||||
Weekday = N ;
|
||||
Monthday = NP ;
|
||||
@@ -72,5 +73,10 @@ lincat Language = PN ;
|
||||
|
||||
lin InLanguage l = SyntaxFre.mkAdv (mkPrep "en") (mkNP l) ;
|
||||
|
||||
lin
|
||||
weekdayN w = w ;
|
||||
monthN m = m ;
|
||||
languagePN l = l ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -66,5 +66,11 @@ lin
|
||||
lincat Language = PN ;
|
||||
|
||||
lin InLanguage l = SyntaxGer.mkAdv on_Prep (mkNP l) ;
|
||||
|
||||
lin
|
||||
weekdayN w = w ;
|
||||
monthN m = m ;
|
||||
languagePN l = l ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ lin
|
||||
cup_of_CN np = mkCN (lin N2 (mkN2 (mkN "kopp") noPrep)) (lin NP np) ;
|
||||
glass_of_CN np = mkCN (lin N2 (mkN2 (mkN "glas" "glas") noPrep)) (lin NP np) ;
|
||||
|
||||
{-
|
||||
-- spatial deixis and motion verbs
|
||||
|
||||
where_go_QCl np = mkQCl (lin IAdv (ss "vart")) (mkCl np (mkVP L.go_V)) ;
|
||||
@@ -40,7 +41,7 @@ lin
|
||||
go_there_VP = mkVP (mkVP L.go_V) (mkAdv "dit") ;
|
||||
come_there_VP = mkVP (mkVP L.come_V) (mkAdv "dit") ;
|
||||
come_from_there_VP = mkVP (mkVP L.come_V) (mkAdv "därifrån") ;
|
||||
|
||||
-}
|
||||
|
||||
lincat
|
||||
Weekday = N ;
|
||||
@@ -67,5 +68,9 @@ lincat Language = PN ;
|
||||
|
||||
lin InLanguage l = SyntaxSwe.mkAdv on_Prep (mkNP l) ;
|
||||
|
||||
lin
|
||||
weekdayN w = w ;
|
||||
monthN m = m ;
|
||||
languagePN l = l ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user