diff --git a/lib/resource-1.0/README b/lib/resource-1.0/README index 8bcb712c9..b9d146aba 100644 --- a/lib/resource-1.0/README +++ b/lib/resource-1.0/README @@ -14,14 +14,14 @@ will be kept available, but 'resource' will be renamed 'resource-0.9', and 'resource' will probably be made into a symbolic link to the current version. -To test: +To compile: make For translation from Eng to all others, try e.g. - gf langs.gfcm - > p -cat=Phr -mcfg -parser=topdown "I haven't seen her" | l -multi + gf -nocf langs.gfcm + > p -cat=Phr -fcfg "I haven't seen her" | l -multi To link to the library, use the precompiled packages @@ -72,6 +72,9 @@ Notice that GF v. ---------- later history and status: +16/6 Close to complete, with 10 languages and a substantial part of + Arabic. + 25/2 Added directories for precompiled libraries directly under lib. See doc/index.html for more information. diff --git a/lib/resource-1.0/TODO b/lib/resource-1.0/TODO index b2df9f658..763bd5bdc 100644 --- a/lib/resource-1.0/TODO +++ b/lib/resource-1.0/TODO @@ -18,9 +18,9 @@ Ita: infinitive contractions %Ger: constituents of infinitive VP -Spa: ordinal numbers +%Spa: ordinal numbers -Nor: Ext: possessives +%Nor: Ext: possessives %Spa: zero subjects @@ -38,10 +38,10 @@ API: multimodal/: dialogue-specific lexicon %API: swadesh/: build a swadesh-related API and migrate lexica -API: mathematical/: symbolic formulas as Cl +%API: mathematical/: symbolic formulas as Cl %API: text construction %All: punctuation -API: apposition, e.g. Det -> CN -> [PN] -> NP +%API: apposition, e.g. Det -> CN -> [PN] -> NP diff --git a/lib/resource-1.0/english/ResEng.gf b/lib/resource-1.0/english/ResEng.gf index 7720e0def..4e70cc8e4 100644 --- a/lib/resource-1.0/english/ResEng.gf +++ b/lib/resource-1.0/english/ResEng.gf @@ -181,37 +181,35 @@ resource ResEng = ParamX ** open Prelude in { } ; ---- The order gets wrong with AdV, but works around a parser ---- generation bug. + predV : Verb -> VP = predGenV False ; - predV : Verb -> VP = \verb -> { + predGenV : Bool -> Verb -> VP = \contr, verb -> { s = \\t,ant,b,ord,agr => let inf = verb.s ! VInf ; fin = presVerb verb agr ; part = verb.s ! VPPart ; - vf : Str -> Str -> {fin, inf : Str} = \x,y -> - {fin = x ; inf = y} ; + vn = vfn contr ; in case of { - => vf fin [] ; --- should be opp + => vf fin [] ; => vf (does agr) inf ; => vf (have agr) part ; --# notpresent - => vf (havent agr) part ; --# notpresent - => vf (verb.s ! VPast) [] ; --# notpresent --- should be opp + => vn (have agr) (havent agr) part ; --# notpresent + => vf (verb.s ! VPast) [] ; --# notpresent => vf "did" inf ; --# notpresent - => vf "didn't" inf ; --# notpresent + => vn "did" "didn't" inf ; --# notpresent => vf "had" part ; --# notpresent - => vf "hadn't" part ; --# notpresent + => vn "had" "hadn't" part ; --# notpresent => vf "will" inf ; --# notpresent - => vf "won't" inf ; --# notpresent + => vn "will" "won't" inf ; --# notpresent => vf "will" ("have" ++ part) ; --# notpresent - => vf "won't" ("have" ++ part) ; --# notpresent + => vn "will" "won't"("have" ++ part) ; --# notpresent => vf "would" inf ; --# notpresent - => vf "wouldn't" inf ; --# notpresent + => vn "would" "wouldn't" inf ; --# notpresent => vf "would" ("have" ++ part) ; --# notpresent - => vf "wouldn't" ("have" ++ part) ; --# notpresent - => vf (doesnt agr) inf + => vn "would" "wouldn't" ("have" ++ part) ; --# notpresent + => vn (does agr) (doesnt agr) inf } ; prp = verb.s ! VPresPart ; inf = verb.s ! VInf ; @@ -219,36 +217,48 @@ resource ResEng = ParamX ** open Prelude in { s2 = \\a => if_then_Str verb.isRefl (reflPron ! a) [] } ; - predAux : Aux -> VP = \verb -> { + predAux : Aux -> VP = predGenAux False ; + + predGenAux : Bool -> Aux -> VP = \contr, verb -> { s = \\t,ant,b,ord,agr => let inf = verb.inf ; fin = verb.pres ! b ! agr ; + finp = verb.pres ! Pos ! agr ; part = verb.ppart ; - vf : Str -> Str -> {fin, inf : Str} = \x,y -> - {fin = x ; inf = y} ; + vn = vfn contr ; in case of { => vf (have agr) part ; --# notpresent - => vf (havent agr) part ; --# notpresent - => vf (verb.past ! b ! agr) [] ; --# notpresent + => vn (have agr) (havent agr) part ; --# notpresent + => vf (verb.past ! b ! agr) [] ; --# notpresent + => vn (verb.past!Pos!agr)(verb.past!Neg!agr) [] ; --# notpresent => vf "had" part ; --# notpresent - => vf "hadn't" part ; --# notpresent + => vn "had" "hadn't" part ; --# notpresent => vf "will" inf ; --# notpresent - => vf "won't" inf ; --# notpresent + => vn "will" "won't" inf ; --# notpresent => vf "will" ("have" ++ part) ; --# notpresent - => vf "won't" ("have" ++ part) ; --# notpresent + => vn "will" "won't"("have" ++ part) ; --# notpresent => vf "would" inf ; --# notpresent - => vf "wouldn't" inf ; --# notpresent + => vn "would" "wouldn't" inf ; --# notpresent => vf "would" ("have" ++ part) ; --# notpresent - => vf "wouldn't" ("have" ++ part) ; --# notpresent - => vf fin [] + => vn "would" "wouldn't" ("have" ++ part) ; --# notpresent + => vf fin [] ; + => vn finp fin [] } ; prp = verb.prpart ; inf = verb.inf ; ad = [] ; s2 = \\_ => [] } ; + + vf : Str -> Str -> {fin, inf : Str} = \x,y -> vfn True x x y ; + + vfn : Bool -> Str -> Str -> Str -> {fin, inf : Str} = \contr,x,y,z -> + case contr of { + True => {fin = y ; inf = z} ; + False => {fin = x ; inf = "not" ++ z} + } ; insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> { s = vp.s ;