mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-17 15:12:50 -06:00
Swedish relatives
This commit is contained in:
@@ -1,34 +1,44 @@
|
||||
--concrete RelativeScand of Relative = CatScand ** open ResScand in {
|
||||
incomplete concrete RelativeScand of Relative =
|
||||
CatScand ** open DiffScand, ResScand in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
|
||||
RelCl cl = {
|
||||
s = \\t,a,p,ag => pronSuch ! ag.gn ++ conjThat ++ cl.s ! t ! a ! p ! Sub
|
||||
} ;
|
||||
|
||||
RelVP rp vp = {
|
||||
s = \\t,ant,b,ag =>
|
||||
let
|
||||
agr = case rp.a of {
|
||||
RNoAg => ag ;
|
||||
RAg a => a
|
||||
} ;
|
||||
cl = mkClause (rp.s ! ag.gn ! RNom) agr vp
|
||||
in
|
||||
cl.s ! t ! ant ! b ! Sub
|
||||
} ;
|
||||
|
||||
--- We make this easy by using "som" and preposition stranding. It would be
|
||||
--- a proble to determine whether $slash$ takes a direct object, since
|
||||
--- $slash.c2$ is defined to be just a string.
|
||||
--
|
||||
-- flags optimize=all_subs ;
|
||||
--
|
||||
-- lin
|
||||
--
|
||||
-- RelCl cl = {
|
||||
-- s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! ODir
|
||||
-- } ;
|
||||
--
|
||||
-- RelVP rp vp = {
|
||||
-- s = \\t,ant,b,ag =>
|
||||
-- let
|
||||
-- agr = case rp.a of {
|
||||
-- RNoAg => ag ;
|
||||
-- RAg a => a
|
||||
-- } ;
|
||||
-- cl = mkS (rp.s ! Nom) agr vp.s vp.s2
|
||||
-- in
|
||||
-- cl.s ! t ! ant ! b ! ODir
|
||||
-- } ;
|
||||
--
|
||||
-- RelSlash rp slash = {
|
||||
-- s = \\t,a,p,_ => slash.c2 ++ rp.s ! Acc ++ slash.s ! t ! a ! p ! ODir
|
||||
-- } ;
|
||||
--
|
||||
-- FunRP p np rp = {
|
||||
-- s = \\c => np.s ! c ++ p.s ++ rp.s ! Acc ;
|
||||
-- a = RAg np.a
|
||||
-- } ;
|
||||
--
|
||||
-- IdRP = mkIP "which" "which" "whose" Sg ** {a = RNoAg} ;
|
||||
--
|
||||
--}
|
||||
-- The empty relative is left to $ExtScand$.
|
||||
|
||||
RelSlash rp slash = {
|
||||
s = \\t,a,p,ag =>
|
||||
rp.s ! ag.gn ! RNom ++ slash.s ! t ! a ! p ! Sub ++ slash.c2
|
||||
} ;
|
||||
|
||||
--- The case here could be genitive.
|
||||
|
||||
FunRP p np rp = {
|
||||
s = \\gn,c => np.s ! nominative ++ p.s ++ rp.s ! gn ! RPrep ;
|
||||
a = RAg np.a
|
||||
} ;
|
||||
|
||||
IdRP = {s = relPron ; a = RNoAg} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user