From 16c0fb00f7e8cda44ae942d7301d6309c5041384 Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 4 Apr 2013 13:14:02 +0000 Subject: [PATCH] missing ParseFin syntax constructs --- lib/src/finnish/ConjunctionFin.gf | 5 ++++ lib/src/finnish/PhraseFin.gf | 1 + lib/src/finnish/stemmed/DictEngFin.gf | 14 +++++----- lib/src/finnish/stemmed/ExtraFin.gf | 14 +++++----- lib/src/finnish/stemmed/ParseFin.gf | 40 ++++++--------------------- lib/src/finnish/stemmed/VerbFin.gf | 1 - lib/src/finnish/stemmed/log.txt | 11 ++++++++ 7 files changed, 39 insertions(+), 47 deletions(-) diff --git a/lib/src/finnish/ConjunctionFin.gf b/lib/src/finnish/ConjunctionFin.gf index 69660f8c2..e887cc28e 100644 --- a/lib/src/finnish/ConjunctionFin.gf +++ b/lib/src/finnish/ConjunctionFin.gf @@ -9,6 +9,8 @@ concrete ConjunctionFin of Conjunction = ConjAdv = conjunctDistrSS ; + ConjIAdv = conjunctDistrSS ; + ConjNP conj ss = conjunctDistrTable NPForm conj ss ** { a = conjAgr (Ag conj.n P3) ss.a ; -- P3 is the maximum isPron = False ; isNeg = ss.isNeg @@ -30,6 +32,8 @@ concrete ConjunctionFin of Conjunction = ConsS = consrSS comma ; BaseAdv = twoSS ; ConsAdv = consrSS comma ; + BaseIAdv = twoSS ; + ConsIAdv = consrSS comma ; BaseNP x y = twoTable NPForm x y ** {a = conjAgr x.a y.a ; isNeg = orB x.isNeg y.isNeg} ; ConsNP xs x = consrTable NPForm comma xs x ** {a = conjAgr xs.a x.a ; isNeg = orB xs.isNeg x.isNeg} ; BaseAP x y = twoTable2 Bool NForm x y ; @@ -42,6 +46,7 @@ concrete ConjunctionFin of Conjunction = lincat [S] = {s1,s2 : Str} ; [Adv] = {s1,s2 : Str} ; + [IAdv] = {s1,s2 : Str} ; [NP] = {s1,s2 : NPForm => Str ; a : Agr ; isNeg : Bool} ; [AP] = {s1,s2 : Bool => NForm => Str} ; [RS] = {s1,s2 : Agr => Str ; c : NPForm} ; diff --git a/lib/src/finnish/PhraseFin.gf b/lib/src/finnish/PhraseFin.gf index 372293b7c..b16714c05 100644 --- a/lib/src/finnish/PhraseFin.gf +++ b/lib/src/finnish/PhraseFin.gf @@ -17,6 +17,7 @@ concrete PhraseFin of Phrase = CatFin ** open ResFin, (P = Prelude) in { UttCN np = {s = np.s ! NCase Sg Nom} ; UttAP np = {s = np.s ! P.False ! NCase Sg Nom} ; UttCard n = {s = n.s ! Sg ! Nom} ; + UttInterj i = i ; NoPConj = {s = []} ; PConjConj conj = {s = conj.s2} ; diff --git a/lib/src/finnish/stemmed/DictEngFin.gf b/lib/src/finnish/stemmed/DictEngFin.gf index 623e58f2f..4dff0711c 100644 --- a/lib/src/finnish/stemmed/DictEngFin.gf +++ b/lib/src/finnish/stemmed/DictEngFin.gf @@ -59070,7 +59070,9 @@ zymotic_A = mkWA "tsymoosiin" "liittyvä" ; worry_VS = mkVS (caseV partitive (mkV "huolettaa")) ; --- minua huolettaa että zip_code_N = mkN "postinumero" ; -oper tehda_V = mkV (lin VK {s = c71 "tehdä"}) ; +oper + tehda_V = mkV (lin VK {s = c71 "tehdä"}) ; + nahda_V = mkV (lin VK {s = c71 "nähdä"}) ; --MANUAL10 -- another batch of additions, 29/3/2013 @@ -59321,7 +59323,7 @@ familiar_with_A2 = mkA2 (mkA "perehtynyt") (mkPrep illative) ; --MAN some_Quant = heavyQuant {s1 = S.jokinPron ; s2 = \\_ => [] ; isNum,isPoss,isNeg,isDef = False} ; --MAN anyPl_Det = {s1,sp = S.mikaInt ! Pl ; s2 = \\_ => "tahansa" ; isNum,isPoss,isNeg,isDef = False ; n = Pl} ; --MAN little_Det = mkDet False Sg (exceptNomN (mkN "vähä") "vähän") partitive ; --MAN -both_Det = mkDet Pl (mkN "molempi" "molamman" "molempia") ; --MAN +both_Det = mkDet Pl (mkN "molempi" "molemman" "molempia") ; --MAN most_Det = mkDet Pl (mkN "usein" "useimman" "useimpia") ; --MAN several_Num = {s = \\n,c => (snoun2nounBind (mkN "usea")).s ! NCase n c ; n = Sg ; isNum = True} ; --suspect --MAN another_Quant = heavyQuant {s1 = \\n,c => (snoun2nounBind (mkN "toinen")).s ! NCase n c ; s2 = \\_ => [] ; isNum,isPoss,isNeg,isDef = False} ; --MAN @@ -60080,7 +60082,7 @@ san_francisco_PN = mkPN "San Francisco" ; thus_Adv = mkAdv "siten" ; ever_AdV = mkAdV "koskaan" ; out_Prep = mkPrep "ulos" elative ; -see_V = mkV "nähdä" ; +see_V = nahda_V ; price_V2 = mkV2 "hinnoitella" ; next_Prep = mkPrep elative "seuraava" ; mind_N = mkN "mieli" ; @@ -60318,10 +60320,8 @@ bolt_N = mkN "pultti" ; beside_Prep = mkPrep "vieressä" ; aesthetic_A = mkA "esteettinen" ; - -----see_V2V = mkV2V "see" ; -----whichSg_IDet = mkIDet "whichSg" ; - +see_V2V = mkV2V nahda_V (mkPrep genitive) infPresPart ; +whichSg_IDet = {s = S.mikaInt ! Sg ; n = Sg ; isNum = False} ; ---- why needed? diff --git a/lib/src/finnish/stemmed/ExtraFin.gf b/lib/src/finnish/stemmed/ExtraFin.gf index 2ad9e0582..f9b6308e1 100644 --- a/lib/src/finnish/stemmed/ExtraFin.gf +++ b/lib/src/finnish/stemmed/ExtraFin.gf @@ -24,16 +24,16 @@ concrete ExtraFin of ExtraFinAbs = CatFin ** } ; lincat - VPI = {s : Str} ; - [VPI] = {s1,s2 : Str} ; + VPI = {s : InfForm => Str} ; + [VPI] = {s1,s2 : InfForm => Str} ; lin - BaseVPI = twoSS ; - ConsVPI = consrSS comma ; + BaseVPI = twoTable InfForm ; + ConsVPI = consrTable InfForm comma ; - MkVPI vp = {s = infVP (NPCase Nom) Pos (agrP3 Sg) vp Inf1} ; - ConjVPI = conjunctDistrSS ; + MkVPI vp = {s = \\i => infVP (NPCase Nom) Pos (agrP3 Sg) vp i} ; + ConjVPI = conjunctDistrTable InfForm ; ComplVPIVV vv vpi = - insertObj (\\_,_,_ => vpi.s) (predSV vv) ; + insertObj (\\_,_,_ => vpi.s ! vv.vi) (predSV vv) ; lincat VPS = { diff --git a/lib/src/finnish/stemmed/ParseFin.gf b/lib/src/finnish/stemmed/ParseFin.gf index b9d823008..c588811db 100644 --- a/lib/src/finnish/stemmed/ParseFin.gf +++ b/lib/src/finnish/stemmed/ParseFin.gf @@ -105,12 +105,9 @@ lin isNeg = quant.isNeg } ; - -- V2V -> Ant -> Pol -> VP -> VPSlash SlashV2V v ant p vp = insertObj (\\_,b,a => infVPGen p.p v.sc b a vp v.vi) (predSV v) ** {c2 = v.c2} ; --- SlashSlashV2V : V2V -> Ant -> Pol -> VPSlash -> VPSlash ; - CompS s = {s = \\_ => "että" ++ s.s} ; -- S -> Comp ---- what are these expected to do ? 29/3/2013 CompVP ant pol vp = {s = \\a => infVPGen pol.p vp.sc Pos a vp Inf1} ; -- VP -> Comp @@ -129,39 +126,18 @@ lin EmptyRelSlash cls = mkRCl which_RP cls ; + CompQS qs = {s = \\_ => qs.s} ; AdAdV ada adv = {s = ada.s ++ adv.s} ; --- SlashVPIV2V : V2V -> Pol -> VPI -> VPSlash ; --- VPSlashVS : VS -> VP -> VPSlash ; + SlashVPIV2V v pol vpi = -- : V2V -> Pol -> VPI -> VPSlash ; + insertObj (\\_,b,a => vpi.s ! v.vi) (predSV v) ** {c2 = v.c2} ; + VPSlashVS v vp = -- : VS -> VP -> VPSlash ; -- hän sanoo (minun) menevän (!) ---- menneen ? + insertObj (\\_,b,a => infVP v.sc b a vp InfPresPart) (predSV v) ** {c2 = {c = NPCase Gen ; s = [] ; isPre = True}} ; + +-- SlashSlashV2V : V2V -> Ant -> Pol -> VPSlash -> VPSlash ; --- not implemented in Eng either so far +--in Verb, SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash } -{- --- 19 constructors missing, as revealed by the 3k sentences from Penn 28/3(2013 --- [AdAdV] --- [AdvAP] --- [CompS] --- [CompVP] --- [EmptyRelSlash] --- [GenRP] --- [GerundAP] --- [GerundN] --- [OrdCompar] --- [PositAdVAdj] --- [PredVPovs] --- [PresPartRS] --- [SSubjS] -[SlashSlashV2V] --- [SlashV2V] -[SlashVPIV2V] --- [UncNeg] --- [UttAdV] -[VPSlashVS] - - -ParseEngAbs> pg -missing | wf -file=missing-ParseFin - -AddAdvQVP AdnCAdv AdvIAdv AdvIP AdvQVP BaseIAdv CAdvAP CNNumNP CompIAdv CompIP CompQS CompS CompVP ComparAdvAdj ComparAdvAdjS ComplN2 ComplN3 ComplSlashIP ComplVQ ConjIAdv ConsIAdv EmbedQS GerundAP GerundN IdetCN IdetIP IdetQuant OrdCompar PositAdVAdj PredVPovs PrepIP QuestCl QuestIAdv QuestIComp QuestQVP QuestSlash QuestVP SlashSlashV2V SlashV2Q SlashV2V SlashV2VNP SlashVPIV2V Use2N3 Use3N3 UseN2 UseQCl UseQuantPN UttInterj UttQS VPSlashVS --} \ No newline at end of file diff --git a/lib/src/finnish/stemmed/VerbFin.gf b/lib/src/finnish/stemmed/VerbFin.gf index 190d85345..d2ed9f653 100644 --- a/lib/src/finnish/stemmed/VerbFin.gf +++ b/lib/src/finnish/stemmed/VerbFin.gf @@ -43,7 +43,6 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin, StemFin in { insertExtrapos (q.s) (predSV v) ** {c2 = v.c2} ; SlashV2V v vp = insertObj (\\_,b,a => infVP v.sc b a vp v.vi) (predSV v) ** {c2 = v.c2} ; - ---- different infinitives SlashV2A v ap = insertObj (\\fin,b,_ => diff --git a/lib/src/finnish/stemmed/log.txt b/lib/src/finnish/stemmed/log.txt index e92450cd3..44f2cf3b3 100644 --- a/lib/src/finnish/stemmed/log.txt +++ b/lib/src/finnish/stemmed/log.txt @@ -206,4 +206,15 @@ Rough estimate: in DictEngFin, there are 60k words, of which 57.5k from WN, 2.5k manual (based on grep mkW DictEngFin.gf). +4/4 + +Sent missing Penn words to Inari. + +Added missing syntactic constructs. Including a very nice one: +VPSlashVS : VS -> VPSlash -> VPSlash, which permits "Mr. Bronner +vaikuttaa uskovan että kuulustelut voivat tulla kummaksi tahansa +tieksi". + +Having fixed the negativity of heither_Det yesterday, changed 22 +sentences (only). Now at version 16.