From fa4fcdab354962356cb988fc1c5997caf8798ebf Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 28 May 2012 15:14:45 +0000 Subject: [PATCH] Text as startcat in ResourceDemo ; adjustments in Finnish NP's --- lib/src/demo/ResourceDemo.gf | 6 +++++- lib/src/demo/ResourceDemoEng.gf | 6 ++++++ lib/src/finnish/DictEngFin.gf | 30 +++++++++++++++--------------- lib/src/finnish/ParseFin.gf | 4 +++- lib/src/finnish/SymbolFin.gf | 6 +++--- 5 files changed, 32 insertions(+), 20 deletions(-) diff --git a/lib/src/demo/ResourceDemo.gf b/lib/src/demo/ResourceDemo.gf index d4ac7c53e..809eb00ea 100644 --- a/lib/src/demo/ResourceDemo.gf +++ b/lib/src/demo/ResourceDemo.gf @@ -115,12 +115,16 @@ abstract ResourceDemo = Lexicon, Numeral, Grammar [ ] ** { -flags startcat = Utt ; +flags startcat = Text ; -- functions with different type fun + TextS : S -> Text ; -- with . + TextQS : QS -> Text ; -- with ? + TextImp : VP -> Text ; -- with ! + ComplV2 : V2 -> NP -> VP ; ModCN : AP -> CN -> CN ; CompAP : AP -> VP ; diff --git a/lib/src/demo/ResourceDemoEng.gf b/lib/src/demo/ResourceDemoEng.gf index dd1367a4c..049d96f71 100644 --- a/lib/src/demo/ResourceDemoEng.gf +++ b/lib/src/demo/ResourceDemoEng.gf @@ -61,6 +61,7 @@ concrete ResourceDemoEng of ResourceDemo = LexiconEng, NumeralEng, GrammarEng [ -- extension of the mini grammar -- cat + Text, -- text (with punctuation) e.g. "Who knows it?" Utt, -- utterance (sentence or question) e.g. "does she walk" QS, -- question (fixed tense) e.g. "who doesn't walk" QCl, -- question clause (variable tense) e.g. "who walks" @@ -85,6 +86,7 @@ concrete ResourceDemoEng of ResourceDemo = LexiconEng, NumeralEng, GrammarEng [ Imp, Bool, True, False, Voc, -- fun + UttS , -- S -> Utt, UttQS, -- QS -> Utt, @@ -123,6 +125,10 @@ concrete ResourceDemoEng of ResourceDemo = LexiconEng, NumeralEng, GrammarEng [ -- functions with different type lin + TextS s = mkText (lin S s) ; + TextQS qs = mkText (lin QS qs) ; + TextImp vp = mkText (mkImp (lin VP vp)) ; + ComplV2 v np = mkVP v np ; ModCN ap cn = lin CN (mkCN ) ; CompAP ap = mkVP (lin AP ap) ; diff --git a/lib/src/finnish/DictEngFin.gf b/lib/src/finnish/DictEngFin.gf index ff9807af8..d26720a44 100644 --- a/lib/src/finnish/DictEngFin.gf +++ b/lib/src/finnish/DictEngFin.gf @@ -38721,6 +38721,7 @@ lin zoom_V = mkV "kiitää" ; -- 7632 {lock_N = <>}) Sg ; -- everywhere_Adv = ss "kaikkialla" ; few_Det = mkDet Sg (mkN "harva") ; +--- first_Ord = {s = \\n,c => (mkN "ensimmäinen").s ! NCase n c} ; for_Prep = casePrep allative ; from_Prep = casePrep elative ; he_Pron = mkPronoun "hän" "hänen" "häntä" "hänenä" "häneen" Sg P3 ; @@ -38761,22 +38762,22 @@ lin zoom_V = mkV "kiitää" ; -- 7632 somebody_NP = { s = \\c => jokuPron ! Sg ! npform2case Sg c ; a = agrP3 Sg ; - isPron = False + isPron = False ; isNeg = False } ; someSg_Det = heavyDet { s1 = jokuPron ! Sg ; s2 = [] ; - isNum,isPoss = False ; isDef = True ; n = Sg + isNum,isPoss = False ; isDef = True ; isNeg = False ; n = Sg } ; somePl_Det = heavyDet { s1 = jokuPron ! Pl ; - s2 = [] ; isNum,isPoss = False ; isDef = True ; - n = Pl + s2 = [] ; isNum,isPoss = False ; isNeg = False ; isDef = True ; + n = Pl ; isNeg = False } ; something_NP = { s = \\c => jokinPron ! Sg ! npform2case Sg c ; a = agrP3 Sg ; - isPron = False + isPron = False ; isNeg = False ; isNeg = False } ; -- somewhere_Adv = ss "jossain" ; that_Quant = heavyQuant { @@ -38788,7 +38789,7 @@ lin zoom_V = mkV "kiitää" ; -- 7632 c => (mkPronoun "nuo" "noiden" "noita" "noina" "noihin" Sg P3).s ! NPCase c } } ; - s2 = [] ; isNum,isPoss = False ; isDef = True ; + s2 = [] ; isNum,isPoss = False ; isDef = True ; isNeg = False } ; that_Subj = ss "että" ; -- there_Adv = ss "siellä" ; --- tuolla @@ -38805,7 +38806,7 @@ lin zoom_V = mkV "kiitää" ; -- 7632 c => (mkPronoun "nämä" "näiden" "näitä" "näinä" "näihin" Sg P3).s ! NPCase c } } ; - s2 = [] ; isNum,isPoss = False ; isDef = True ; + s2 = [] ; isNum,isPoss = False ; isDef = True ; isNeg = False } ; through_Prep = postGenPrep "kautta" ; too_AdA = ss "liian" ; @@ -38955,7 +38956,7 @@ oper makeNP noun num = { s = \\c => noun.s ! NCase num (npform2case num c) ; a = agrP3 num ; - isPron = False ; + isPron, isNeg = False ; lock_NP = <> } ; @@ -38963,21 +38964,21 @@ lin not_Predet = {s = \\_,_ => "ei"} ; no_Quant = heavyQuant { - s1 = \\n,c => "ei" ++ mikaanPron ! n ! c ; - s2 = [] ; isNum,isPoss = False ; isDef = True ; + s1 = \\n,c => mikaanPron ! n ! c ; -- requires negative or question polarity + s2 = [] ; isNum,isPoss = False ; isDef = True ; isNeg = True } ; if_then_Conj = {s1 = "jos" ; s2 = "niin" ; n = Sg} ; nobody_NP = { - s = \\c => "ei" ++ kukaanPron ! Sg ! npform2case Sg c ; + s = \\c => kukaanPron ! Sg ! npform2case Sg c ; -- requires negative or question polarity a = agrP3 Sg ; - isPron = False + isPron = False ; isNeg = True } ; nothing_NP = { - s = \\c => "ei" ++ mikaanPron ! Sg ! npform2case Sg c ; + s = \\c => mikaanPron ! Sg ! npform2case Sg c ; --- requires negative or question polarity a = agrP3 Sg ; - isPron = False + isPron = False ; isNeg = True } ; at_least_AdN = ss "vähintään" ; @@ -38991,7 +38992,6 @@ lin lin language_title_Utt = ss "suomi" ; - --- concrete LexiconFin of Lexicon = CatFin ** open MorphoFin, ParadigmsFin in { lin diff --git a/lib/src/finnish/ParseFin.gf b/lib/src/finnish/ParseFin.gf index eb75758d9..7e12e1977 100644 --- a/lib/src/finnish/ParseFin.gf +++ b/lib/src/finnish/ParseFin.gf @@ -13,7 +13,9 @@ concrete ParseFin of ParseEngAbs = SentenceFin, RelativeFin, IdiomFin [NP, VP, Tense, Cl, ProgrVP, ExistNP], - ExtraFin [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash] + ExtraFin [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, + Temp, Tense, Pol, Conj, VPS, ListVPS, S, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, + VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV] , DictEngFin ** open MorphoFin, ResFin, ParadigmsFin, SyntaxFin, Prelude in { diff --git a/lib/src/finnish/SymbolFin.gf b/lib/src/finnish/SymbolFin.gf index fc7923a8a..4be642d84 100644 --- a/lib/src/finnish/SymbolFin.gf +++ b/lib/src/finnish/SymbolFin.gf @@ -11,17 +11,17 @@ lin CNIntNP cn i = { s = \\c => cn.s ! NCase Sg (npform2case Sg c) ++ i.s ; a = agrP3 Sg ; - isPron = False + isPron = False ; isNeg = False } ; CNSymbNP det cn xs = let detcn = NounFin.DetCN det cn in { s = \\c => detcn.s ! c ++ xs.s ; a = detcn.a ; - isPron = False + isPron = False ; isNeg = False } ; CNNumNP cn i = { s = \\c => cn.s ! NCase Sg (npform2case Sg c) ++ i.s ! Sg ! Nom ; a = agrP3 Sg ; - isPron = False + isPron = False ; isNeg = False } ; SymbS sy = sy ;