diff --git a/grammars/health/HealthRus.gf b/grammars/health/HealthRus.gf index 9f2ee73ea..e4291dc2a 100644 --- a/grammars/health/HealthRus.gf +++ b/grammars/health/HealthRus.gf @@ -65,7 +65,7 @@ lin Antidepressant = IndefOneNP (UseN ( antidepressant**{lock_N = <>})); PainKiller = IndefOneNP (UseN ( obezbolivauchee**{lock_N = <>})); - Fever = mkNounPhrase Sg (UseN ( temperatura**{lock_N = <>}))** {lock_NP = <>}; + Fever = mkNounPhrase singular (UseN ( temperatura**{lock_N = <>}))** {lock_NP = <>}; BeInCondition = PredVP ; CatchCold = PosVG (PredAP (AdjP1 (prostuzhen ** {lock_Adj1 = <>}))) ; Pregnant = PosVG (PredAP (AdjP1 (beremenen ** {lock_Adj1 = <>}))) ; @@ -78,7 +78,7 @@ lin (extVerb verbSlomat active past)**{lock_TV = <>}) patient (mkNounPhrase patient.n painkiller ** {lock_NP = <>}) ; HaveIllness patient symptom = U_predTransVerb true tvHave - patient (mkNounPhrase Sg symptom ** {lock_NP = <>}) ; + patient (mkNounPhrase singular symptom ** {lock_NP = <>}) ; Complain = U_predTransVerb true tvHave ; NeedDoctor = predNeedShortAdjective true ; @@ -101,11 +101,11 @@ lin -- High = AdjP1 (extAdjective vusokij ** {lock_Adj1 = <>}); -- Terrible = AdjP1 (extAdjective uzhasnuj ** {lock_Adj1 = <>}); --- FeverMod degree = mkNounPhrase Sg +-- FeverMod degree = mkNounPhrase singular -- (ModAdj degree (UseN ( temperatura**{lock_N = <>}))) ** {lock_NP = <>}; -- PainInMod patient head degree = U_predTransVerb true (mkDirectVerb -- (extVerb have Act Present) ** {lock_TV =<>}) patient --- (mkNounPhrase Sg (ModAdj degree +-- (mkNounPhrase singular (ModAdj degree --(AppFun (mkFun bol "в" Prepos ** {lock_Fun = <>}) -- (mkNounPhrase patient.n head** {lock_NP = <>}))) ** {lock_NP =<>}); }; diff --git a/grammars/health/HealthSwe.gf b/grammars/health/HealthSwe.gf index 4ff5e5f21..b5dcd2e43 100644 --- a/grammars/health/HealthSwe.gf +++ b/grammars/health/HealthSwe.gf @@ -1,7 +1,8 @@ -- The UTF8 version currently differs from the non-UTF8 !!! -- The difference with the UTF8 version is that --- operation "verbVara" doesn't need to be replaced +-- operations "verbVara" (vbVara see ExtraSweU.gf) +-- and "predAP" (predAP, see ExtraSweU.gf) need to be replaced -- using the UTF8 encoding (because of the UTF8 problem -- with UTF8 resource grammars) @@ -100,10 +101,10 @@ lin Leg = UseN (nRep "ben") ; Stomac = UseN (nPojke "mage") ; Throat = UseN (nBil "hals") ; - Ear = UseN (mkN "ra" "rat" "ron" "ronen" Neutr NoMasc) ; + Ear = UseN (mkN "ra" "rat" "ron" "ronen" neutrum nonmasculine) ; Chest = UseN (nRep "brst") ; - Foot = UseN (mkN "fot" "foten" "ftter" "ftterna" Utr NoMasc) ; - Arm = UseN (mkN "hand" "handen" "hnder" "hnderna" Utr NoMasc) ; + Foot = UseN (mkN "fot" "foten" "ftter" "ftterna" utrum nonmasculine) ; + Arm = UseN (mkN "hand" "handen" "hnder" "hnderna" utrum nonmasculine) ; Back = UseN (nBil "rygg") ; Shoulder = UseN (nNyckel "axel") ; @@ -115,7 +116,7 @@ lin -- DetNP (nullDet ** {lock_Det = <>}) -- ( modCommNounPhrase degree -- ( AppFun --- ((mkFun (extCommNoun NoMasc (sBil "ont")) "i") ** {lock_Fun = <>}) +-- ((mkFun (extCommNoun nonmasculine (sBil "ont")) "i") ** {lock_Fun = <>}) -- ((defNounPhrase patient.n head)** {lock_NP = <>}) -- ) ** {lock_CN = <>} -- ) diff --git a/lib/resource-0.6/english/TestResourceEng.gf b/lib/resource-0.6/english/TestResourceEng.gf index 708205ee3..0a18ebd5b 100644 --- a/lib/resource-0.6/english/TestResourceEng.gf +++ b/lib/resource-0.6/english/TestResourceEng.gf @@ -1,6 +1,6 @@ --# -path=.:../abstract:../../prelude -concrete TestResourceEng of TestResource = StructuralEng ** open SyntaxEng in { +concrete TestResourceEng of TestResource = StructuralEng ** open SyntaxEng, ParadigmsEng in { flags startcat=Phr ; lexer=textlit ; parser=chart ; unlexer=text ; @@ -34,8 +34,8 @@ lin Give = mkDitransVerb (verbNoPart (mkVerb "give" "gave" "given")) [] [] ; Prefer = mkDitransVerb (verbNoPart (mkVerb "prefer" "preferred" "preferred")) [] "to" ; - Mother = funOfReg "mother" Hum ; - Uncle = funOfReg "uncle" Hum ; + Mother = funOfReg "mother" human ; + Uncle = funOfReg "uncle" human ; Connection = cnNoHum (nounReg "connection") ** {s2 = "from" ; s3 = "to"} ; Always = advPre "always" ; diff --git a/lib/resource-0.6/russian/TestResourceRus.gf b/lib/resource-0.6/russian/TestResourceRus.gf index d551cacb6..6fe3c99f2 100644 --- a/lib/resource-0.6/russian/TestResourceRus.gf +++ b/lib/resource-0.6/russian/TestResourceRus.gf @@ -1,6 +1,6 @@ -- use this path to read the grammar from the same directory --# -path=.:../abstract:../../prelude -concrete TestResourceRus of TestResource = StructuralRus ** open SyntaxRus in { +concrete TestResourceRus of TestResource = StructuralRus ** open SyntaxRus, ParadigmsRus in { flags coding=utf8 ; @@ -14,16 +14,16 @@ lin Old = staruj ; Young = molodoj ; - Connection = (noun2CommNounPhrase (doroga) )** {s2 = "из" ; c = Gen; s3 = "в"; c2=Acc} ; + Connection = (noun2CommNounPhrase (doroga) )** {s2 = "из" ; c = genitive; s3 = "в"; c2=accusative} ; American = ij_EndK_G_KH_Decl "американск" ; -- adj1Malenkij from Paradigms Finnish = ij_EndK_G_KH_Decl "финск" ; -- adj1Malenkij from Paradigms - Married = adjInvar "замужем" ** {s2 = "за"; c = Inst} ; -- adjinvar from Paradigms - Give = mkDitransVerb (extVerb verbDavat Act Present) Acc Dat; - Prefer = mkDitransVerb (extVerb verbPredpochitat Act Present) Acc Dat ; + Married = adjInvar "замужем" ** {s2 = "за"; c = instructive} ; -- adjinvar from Paradigms + Give = mkDitransVerb (extVerb verbDavat active present) accusative dative; + Prefer = mkDitransVerb (extVerb verbPredpochitat active present) accusative dative ; Bar = bar ; Bottle = butyulka ; Wine = vino ; - Drink = mkDirectVerb (extVerb verbPit Act Present ) ; + Drink = mkDirectVerb (extVerb verbPit active present ) ; Happy = schastlivyuj ; Man = muzhchina ; @@ -31,22 +31,22 @@ lin Car = mashina ; House = dom ; Light = svet ; - Walk = extVerb verbGulyat Act Present ; - Run = extVerb verbBegat Act Present ; - Love = mkDirectVerb (extVerb verbLubit Act Present ) ; - Send = mkDirectVerb (extVerb verbOtpravlyat Act Present ) ; - Wait = mkDirectVerb (extVerb verbZhdat Act Present ); - Say = extVerb verbGovorit Act Present ; --- works in present tense... - Prove = extVerb verbDokazuvat Act Present ; - SwitchOn = mkDirectVerb (extVerb verbVkluchat Act Present ) ; - SwitchOff = mkDirectVerb (extVerb verbVukluchat Act Present ) ; + Walk = extVerb verbGulyat active present ; + Run = extVerb verbBegat active present ; + Love = mkDirectVerb (extVerb verbLubit active present ) ; + Send = mkDirectVerb (extVerb verbOtpravlyat active present ) ; + Wait = mkDirectVerb (extVerb verbZhdat active present ); + Say = extVerb verbGovorit active present ; --- works in present tense... + Prove = extVerb verbDokazuvat active present ; + SwitchOn = mkDirectVerb (extVerb verbVkluchat active present ) ; + SwitchOff = mkDirectVerb (extVerb verbVukluchat active present ) ; - Mother = funGen mama ; - Uncle = funGen dyadya ; +-- Mother = funGen (mama **{lock_N =<>}) ; + -- Uncle = funGen (dyadya **{lock_N =<>}); Always = vsegda ; Well = chorosho ; - John = mkProperNameMasc "Иван" Animate ; - Mary = mkProperNameFem "Маш" Animate ; + John = mkProperNameMasc "Иван" animate ; + Mary = mkProperNameFem "Маш" animate ; }; diff --git a/lib/resource-0.6/swedish/ParadigmsSwe.gf b/lib/resource-0.6/swedish/ParadigmsSwe.gf index 54ff80ca2..4943eff81 100644 --- a/lib/resource-0.6/swedish/ParadigmsSwe.gf +++ b/lib/resource-0.6/swedish/ParadigmsSwe.gf @@ -48,6 +48,7 @@ oper plural : Number ; + --2 Nouns -- Worst case: give all nominative forms and the gender. @@ -159,6 +160,11 @@ oper -- The worst case needs three forms: the infinitive, the indicative, and the -- imperative. + Voice: Type; + + passive : Voice; + active: Voice; + mkV : (_,_,_ : Str) -> V ; -- vara, r, var; trivas, trivs, trivs -- The main conjugations need one string each. @@ -210,6 +216,7 @@ oper Sex = SyntaxSwe.Sex ; Case = SyntaxSwe.Case ; Number = SyntaxSwe.Number ; + Voice = SyntaxSwe.Voice ; utrum = Utr ; neutrum = Neutr ; @@ -220,6 +227,9 @@ oper singular = Sg ; plural = Pl ; + active = Act; + passive = Pass; + mkN = \apa, apan, apor, aporna, g, x -> let {nom = table { SF Sg Indef _ => apa ; diff --git a/lib/resource-0.6/swedish/TestResourceSwe.gf b/lib/resource-0.6/swedish/TestResourceSwe.gf index fc8db3f34..22ac6c56d 100644 --- a/lib/resource-0.6/swedish/TestResourceSwe.gf +++ b/lib/resource-0.6/swedish/TestResourceSwe.gf @@ -1,6 +1,6 @@ --# -path=.:../abstract:../../prelude -concrete TestResourceSwe of TestResource = StructuralSwe ** open SyntaxSwe in { +concrete TestResourceSwe of TestResource = StructuralSwe ** open SyntaxSwe, ParadigmsSwe in { flags startcat=Phr ; lexer=text ; unlexer=text ; @@ -15,16 +15,16 @@ lin Finnish = extAdjective (aFin "finsk") ; Happy = aFin "lycklig" ; Married = extAdjective (aAbstrakt "gift") ** {s2 = "med"} ; - Man = extCommNoun Masc man_1144 ; - Bar = extCommNoun NoMasc (sSak "bar") ; - Bottle = extCommNoun NoMasc (sApa "flask") ; - Woman = extCommNoun NoMasc (sApa "kvinn") ; - Car = extCommNoun NoMasc (sBil "bil") ; - House = extCommNoun NoMasc (sHus "hus") ; - Light = extCommNoun NoMasc (sHus "ljus") ; - Wine = extCommNoun NoMasc (sParti "vin") ; - Walk = extVerb Act g_1174 ; - Run = extVerb Act (vFinna "spring" "sprang" "sprung") ; + Man = extCommNoun masculine man_1144 ; + Bar = extCommNoun nonmasculine (sSak "bar") ; + Bottle = extCommNoun nonmasculine (sApa "flask") ; + Woman = extCommNoun nonmasculine (sApa "kvinn") ; + Car = extCommNoun nonmasculine (sBil "bil") ; + House = extCommNoun nonmasculine (sHus "hus") ; + Light = extCommNoun nonmasculine (sHus "ljus") ; + Wine = extCommNoun nonmasculine (sParti "vin") ; + Walk = extVerb active g_1174 ; + Run = extVerb active (vFinna "spring" "sprang" "sprung") ; Drink = extTransVerb (vFinna "drick" "drack" "druck") [] ; Love = extTransVerb (vTala "lsk") [] ; Send = extTransVerb (vTala "skick") [] ; @@ -33,19 +33,19 @@ lin Prefer = extTransVerb (vFinna "fredrag" "fredrog" "fredrag") [] ** {s3 = "framfr"} ; --- fredra - Say = extVerb Act (vLeka "sg") ; --- works in present tense... - Prove = extVerb Act (vTala "bevis") ; - SwitchOn = mkDirectVerb (extVerbPart Act (vFinna "stt" "satte" "satt") "p") ; - SwitchOff = mkDirectVerb (extVerbPart Act (vLeka "stng") "av") ; + Say = extVerb active (vLeka "sg") ; --- works in present tense... + Prove = extVerb active (vTala "bevis") ; + SwitchOn = mkDirectVerb (extVerbPart active (vFinna "stt" "satte" "satt") "p") ; + SwitchOff = mkDirectVerb (extVerbPart active (vLeka "stng") "av") ; - Mother = mkFun (extCommNoun NoMasc mor_1) "till" ; - Uncle = mkFun (extCommNoun Masc farbror_8) "till" ; - Connection = mkFun (extCommNoun NoMasc (sVarelse "frbindelse")) "frn" ** + Mother = mkFun (extCommNoun nonmasculine mor_1**{lock_N = <>}) "till" ; + Uncle = mkFun (extCommNoun masculine farbror_8 **{lock_N = <>}) "till" ; + Connection = mkFun (extCommNoun nonmasculine (sVarelse "frbindelse")**{lock_N = <>}) "frn" ** {s3 = "till"} ; Always = advPre "alltid" ; Well = advPost "bra" ; - John = mkProperName "Johan" Utr Masc ; - Mary = mkProperName "Maria" Utr NoMasc ; + John = mkProperName "Johan" utrum masculine ; + Mary = mkProperName "Maria" utrum nonmasculine ; } ;