mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-20 18:29:33 -06:00
added constructions to Parse grammars
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
--# -path=alltenses:.:sysu:../english
|
||||
--# -path=.:../english
|
||||
concrete ParseChi of ParseEngAbs =
|
||||
TenseChi,
|
||||
--- CatChi,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
--# -path=alltenses
|
||||
concrete ParseEng of ParseEngAbs =
|
||||
TenseX - [Pol, PNeg, PPos],
|
||||
CatEng,
|
||||
@@ -14,7 +13,8 @@ concrete ParseEng of ParseEngAbs =
|
||||
QuestionEng,
|
||||
RelativeEng,
|
||||
IdiomEng [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP],
|
||||
ExtraEng [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash,
|
||||
ConstructionEng,
|
||||
ExtraEng [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, PassAgentVPSlash,
|
||||
Temp, Pol, Conj, VPS, ListVPS, S, Num, CN, RP, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, GenRP,
|
||||
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
||||
ComplSlashPartLast,
|
||||
|
||||
@@ -13,7 +13,8 @@ abstract ParseEngAbs =
|
||||
Question,
|
||||
Relative,
|
||||
Idiom [NP, VP, Cl, Tense, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP],
|
||||
ExtraEngAbs [NP, Quant, VPSlash, VP, GenNP, PassVPSlash,
|
||||
Construction,
|
||||
ExtraEngAbs [NP, Quant, VPSlash, VP, GenNP, PassVPSlash, PassAgentVPSlash,
|
||||
Temp, Tense, Pol, Conj, VPS, ListVPS, S, Num, CN, RP, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, GenRP,
|
||||
VPI, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV, ComplSlashPartLast,
|
||||
ClSlash, RCl, EmptyRelSlash, VS, V2S, ComplBareVS, SlashBareV2S],
|
||||
|
||||
@@ -5,9 +5,9 @@ concrete ConstructionFin of Construction = CatFin **
|
||||
|
||||
|
||||
lin
|
||||
hungry_VP = mkVP have_V2 (mkNP (ParadigmsFin.mkN "nälkä")) ;
|
||||
thirsty_VP = mkVP have_V2 (mkNP (ParadigmsFin.mkN "jano")) ;
|
||||
has_age_VP card = mkVP (mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> L.year_N))) L.old_A) ;
|
||||
hungry_VP = mkVP have_V2 (lin NP (mkNP (ParadigmsFin.mkN "nälkä"))) ;
|
||||
thirsty_VP = mkVP have_V2 (lin NP (mkNP (ParadigmsFin.mkN "jano"))) ;
|
||||
has_age_VP card = mkVP (mkAP (lin AdA (mkUtt (lin NP (mkNP <lin Card card : Card> L.year_N)))) L.old_A) ;
|
||||
|
||||
have_name_Cl x y = mkCl (mkNP (E.GenNP x) L.name_N) (lin NP y) ;
|
||||
married_Cl x y = mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (ParadigmsFin.mkAdv "naimisissa") ;
|
||||
@@ -22,6 +22,6 @@ lin
|
||||
is_right_VP = mkVP (ParadigmsFin.mkAdv "oikeassa") ;
|
||||
is_wrong_VP = mkVP (ParadigmsFin.mkAdv "väärässä") ;
|
||||
|
||||
n_units_AP card cn a = mkAP (lin AdA (mkUtt (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) ;
|
||||
|
||||
}
|
||||
|
||||
@@ -14,8 +14,9 @@ concrete ParseFin of ParseEngAbs =
|
||||
SentenceFin,
|
||||
QuestionFin,
|
||||
RelativeFin,
|
||||
IdiomFin [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP]
|
||||
, ExtraFin [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, Voc, RP, GenRP, PassVPSlash, PassAgentVPSlash,
|
||||
IdiomFin [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP],
|
||||
ConstructionFin,
|
||||
ExtraFin [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, Voc, RP, GenRP, PassVPSlash, PassAgentVPSlash,
|
||||
Temp, Tense, Pol, Conj, VPS, ListVPS, S, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
|
||||
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV]
|
||||
, DictEngFin
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--# -path=alltenses:.:../abstract
|
||||
|
||||
concrete ConstructionFre of Construction = CatFre **
|
||||
open SyntaxFre, ParadigmsFre, (L = LexiconFre), (E = ExtraFre), Prelude in {
|
||||
open SyntaxFre, ParadigmsFre, (L = LexiconFre), (E = ExtraFre), (I = IrregFre), Prelude in {
|
||||
|
||||
|
||||
lin
|
||||
@@ -17,7 +17,7 @@ lin
|
||||
how_far_QCl x = mkQCl (mkIAdv dative (mkIP which_IDet (mkN "distance"))) x ;
|
||||
|
||||
-- some more things
|
||||
weather_adjCl ap = mkCl (mkVP (lin AP ap)) ;
|
||||
weather_adjCl ap = mkCl (mkVP (mkVA (mkV I.faire_V2)) (lin AP ap)) ;
|
||||
|
||||
is_right_VP = mkVP have_V2 (mkNP (mkN "raison")) ;
|
||||
is_wrong_VP = mkVP have_V2 (mkNP (mkN "tort")) ;
|
||||
|
||||
@@ -14,6 +14,7 @@ concrete ParseFre of ParseEngAbs =
|
||||
QuestionFre,
|
||||
RelativeFre,
|
||||
IdiomFre [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP],
|
||||
ConstructionFre,
|
||||
ExtraFre [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, PassAgentVPSlash,
|
||||
Temp, Pol, Conj, VPS, ListVPS, S, Num, CN, RP, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, GenRP,
|
||||
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
||||
|
||||
@@ -9,10 +9,10 @@ lin
|
||||
thirsty_VP = mkVP (mkA "törstig") ;
|
||||
has_age_VP card = mkVP (lin AP (mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> L.year_N))) L.old_A)) ;
|
||||
|
||||
have_name_Cl x y = mkCl (mkNP (E.GenNP x) L.name_N) (lin NP y) ;
|
||||
have_name_Cl x y = mkCl (lin NP x) (mkV2 (mkV "heter" "hette" "hetat")) (lin NP y) ;
|
||||
married_Cl x y = mkCl (lin NP x) L.married_A2 (lin NP y) | mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (mkA "gift") ;
|
||||
|
||||
what_name_QCl x = mkQCl (mkIComp whatSg_IP) (mkNP (E.GenNP x) L.name_N) ;
|
||||
what_name_QCl x = mkQCl whatSg_IP (lin NP x) (mkV2 (mkV "heter")) ;
|
||||
how_old_QCl x = mkQCl (E.ICompAP (mkAP L.old_A)) (lin NP x) ;
|
||||
how_far_QCl x = mkQCl (E.IAdvAdv L.far_Adv) (mkCl (mkVP (SyntaxSwe.mkAdv to_Prep (lin NP x)))) ;
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@ concrete ParseSwe of ParseEngAbs =
|
||||
QuestionSwe,
|
||||
RelativeSwe,
|
||||
IdiomSwe [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP],
|
||||
ExtraSwe [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash,
|
||||
ConstructionSwe,
|
||||
ExtraSwe [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, PassAgentVPSlash,
|
||||
Temp, Pol, Conj, VPS, ListVPS, S, Num, CN, RP, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, GenRP,
|
||||
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
||||
ClSlash, RCl, EmptyRelSlash],
|
||||
|
||||
Reference in New Issue
Block a user