From 941a9f35baa4a67c1ee5df89f1ae0f40677a214d Mon Sep 17 00:00:00 2001 From: bringert Date: Mon, 13 Mar 2006 10:53:44 +0000 Subject: Added transfer example: constructing reflexives. --- transfer/examples/reflexive/English.gf | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 transfer/examples/reflexive/English.gf (limited to 'transfer/examples/reflexive/English.gf') diff --git a/transfer/examples/reflexive/English.gf b/transfer/examples/reflexive/English.gf new file mode 100644 index 000000000..73fa00e91 --- /dev/null +++ b/transfer/examples/reflexive/English.gf @@ -0,0 +1,54 @@ +concrete English of Abstract = { + +lincat + S = { s : Str } ; + V2 = {s : Num => Str} ; + Conj = {s : Str ; n : Num} ; + NP = {s : Str ; n : Num; g : Gender} ; + +lin + PredV2 v s o = ss (s.s ++ v.s ! s.n ++ o.s) ; + ReflV2 v s = ss (s.s ++ v.s ! s.n ++ self ! s.n ! s.g) ; + -- FIXME: what is the gender of "Mary or Bill"? + ConjNP c A B = {s = A.s ++ c.s ++ B.s ; n = c.n; g = A.g } ; + + John = pn Masc "John" ; + Mary = pn Fem "Mary" ; + Bill = pn Masc "Bill" ; + See = regV2 "see" ; + Whip = regV2 "whip" ; + + And = {s = "and" ; n = Pl } ; + Or = { s = "or"; n = Sg } ; + +param + Num = Sg | Pl ; + Gender = Neutr | Masc | Fem ; + +oper + regV2 : Str -> {s : Num => Str} = \run -> { + s = table { + Sg => run + "s" ; + Pl => run + } + } ; + + self : Num => Gender => Str = + table { + Sg => table { + Neutr => "itself"; + Masc => "himself"; + Fem => "herself" + }; + Pl => \\g => "themselves" + }; + + pn : Gender -> Str -> {s : Str ; n : Num; g : Gender} = \gen -> \bob -> { + s = bob ; + n = Sg ; + g = gen + } ; + + ss : Str -> {s : Str} = \s -> {s = s} ; + +} -- cgit v1.2.3