forked from GitHub/gf-rgl
(Est) get rid of most lock field warnings
This commit is contained in:
@@ -7,7 +7,9 @@ concrete ConjunctionEst of Conjunction =
|
||||
|
||||
ConjS = conjunctDistrSS ;
|
||||
|
||||
ConjAdv = conjunctDistrSS ;
|
||||
ConjAdv,
|
||||
ConjAdV,
|
||||
ConjIAdv = conjunctDistrSS ;
|
||||
|
||||
ConjCN conj ss = conjunctDistrTable NForm conj ss ** ss ;
|
||||
|
||||
@@ -27,8 +29,8 @@ concrete ConjunctionEst of Conjunction =
|
||||
|
||||
BaseS = twoSS ;
|
||||
ConsS = consrSS comma ;
|
||||
BaseAdv = twoSS ;
|
||||
ConsAdv = consrSS comma ;
|
||||
BaseAdv, BaseAdV, BaseIAdv = twoSS ;
|
||||
ConsAdv, ConsAdV, ConsIAdv = consrSS comma ;
|
||||
BaseCN x y = twoTable NForm (mergeCN x) y ** {postmod = y.postmod} ;
|
||||
ConsCN x xs = consrTable NForm comma (mergeCN x) xs ** xs ;
|
||||
BaseNP x y = twoTable NPForm (mergeNP x) y ** {a = conjAgr x.a y.a ; postmod = y.postmod} ;
|
||||
@@ -41,26 +43,29 @@ concrete ConjunctionEst of Conjunction =
|
||||
lincat
|
||||
[S] = {s1,s2 : Str} ;
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[AdV] = {s1,s2 : Str} ;
|
||||
[IAdv] = {s1,s2 : Str} ;
|
||||
[CN] = {s1,s2 : NForm => Str ; postmod : Str} ;
|
||||
[NP] = {s1,s2 : NPForm => Str ; a : Agr ; postmod : Str} ;
|
||||
[AP] = {s1,s2 : {s : Bool => NForm => Str ; infl : Infl }} ;
|
||||
[AP] = LinListAP ;
|
||||
[RS] = {s1,s2 : Agr => Str ; c : NPForm} ;
|
||||
|
||||
oper
|
||||
|
||||
LinListAP : Type = {s1,s2 : {s : Bool => NForm => Str ; infl : Infl}} ;
|
||||
|
||||
--Modified from prelude/Coordination.gf generic functions
|
||||
twoTableAdj : (_,_ : AP) -> [AP] = \x,y ->
|
||||
lin ListAP {
|
||||
twoTableAdj : (_,_ : ResEst.APhrase) -> LinListAP = \x,y -> {
|
||||
s1 = x ;
|
||||
s2 = y
|
||||
} ;
|
||||
|
||||
consrTableAdj : Str -> APhrase -> [AP] -> [AP] = \c,x,xs ->
|
||||
consrTableAdj : Str -> ResEst.APhrase -> LinListAP -> LinListAP = \c,x,xs ->
|
||||
let
|
||||
ap1 = xs.s1 ;
|
||||
ap2 = xs.s2
|
||||
in
|
||||
lin ListAP {s1 =
|
||||
{s = \\isMod,nf =>
|
||||
in {
|
||||
s1 = {s = \\isMod,nf =>
|
||||
case isMod of {
|
||||
True => case <ap1.infl, ap2.infl> of {
|
||||
<(Participle|Invariable),(Participle|Invariable)> =>
|
||||
@@ -74,16 +79,15 @@ concrete ConjunctionEst of Conjunction =
|
||||
False => ap1.s ! isMod ! nf ++ c ++ ap2.s ! isMod ! nf --kassid on valmid ja suured
|
||||
} ;
|
||||
infl = Regular } ;
|
||||
s2 = x ;
|
||||
s2 = x ;
|
||||
} ;
|
||||
|
||||
|
||||
conjunctDistrTableAdj : ConjunctionDistr -> [AP] -> AP = \or,xs ->
|
||||
conjunctDistrTableAdj : ConjunctionDistr -> LinListAP -> APhrase = \or,xs ->
|
||||
let
|
||||
ap1 = xs.s1 ;
|
||||
ap2 = xs.s2 ;
|
||||
in
|
||||
lin AP {s = \\isMod,nf =>
|
||||
in {s = \\isMod,nf =>
|
||||
case isMod of {
|
||||
True => case <ap1.infl, ap2.infl> of {
|
||||
<(Participle|Invariable),(Participle|Invariable)> =>
|
||||
|
||||
@@ -16,12 +16,12 @@ lin
|
||||
let n_years_AdA : AdA = lin AdA (mkUtt (lin NP (mkNP <lin Card card : Card> L.year_N)))
|
||||
in mkVP (mkAP n_years_AdA L.old_A) ;
|
||||
|
||||
have_name_Cl x y = mkCl (mkNP (E.GenNP x) L.name_N) (lin NP y) ;
|
||||
married_Cl x y = mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (ParadigmsEst.mkAdv "abielus") ;
|
||||
have_name_Cl x y = mkCl (mkNP (E.GenNP x) L.name_N) <lin NP y : NP> ;
|
||||
married_Cl x y = mkCl (mkNP and_Conj <lin NP x : NP> <lin NP y : NP>) (ParadigmsEst.mkAdv "abielus") ;
|
||||
|
||||
what_name_QCl x = mkQCl (mkIComp whatSg_IP) (mkNP (E.GenNP x) L.name_N) ;
|
||||
how_old_QCl x = mkQCl (E.ICompAP (mkAP L.old_A)) (lin NP x) ;
|
||||
how_far_QCl x = mkQCl (E.IAdvAdv L.far_Adv) (lin NP x) ;
|
||||
how_old_QCl x = mkQCl (E.ICompAP (mkAP L.old_A)) <lin NP x : NP> ;
|
||||
how_far_QCl x = mkQCl (E.IAdvAdv L.far_Adv) <lin NP x : NP> ;
|
||||
|
||||
-- some more things
|
||||
weather_adjCl ap = mkCl (mkVP (lin AP ap)) ;
|
||||
@@ -29,7 +29,10 @@ lin
|
||||
is_right_VP = mkVP have_V2 (lin NP (mkNP (ParadigmsEst.mkN "õigus"))) ;
|
||||
is_wrong_VP = mkVP (ParadigmsEst.mkV "eksima") ;
|
||||
|
||||
n_units_AP card cn a = mkAP (lin AdA (mkUtt (lin NP (mkNP <lin Card card : Card> (lin CN cn))))) (lin A a) ;
|
||||
n_units_AP card cn a =
|
||||
let x_inches_NP : NP = mkNP <lin Card card : Card> <lin CN cn : CN> ;
|
||||
x_inches_AdA : AdA = lin AdA (mkUtt x_inches_NP) ;
|
||||
in mkAP x_inches_AdA <lin A a : A> ;
|
||||
|
||||
{-
|
||||
glass_of_CN np = mkCN (lin N2 (mkN2 (mkN "klaas") (casePrep partitive))) (lin NP np) | mkCN (lin N2 (mkN2 (mkN "klaasitäis") (casePrep partitive))) (lin NP np) ;
|
||||
|
||||
@@ -23,7 +23,7 @@ lincat
|
||||
oper
|
||||
heading : N -> Str = \n -> (nounHeading n).s ;
|
||||
|
||||
caseplus2nf : N -> ResEst.Number -> CasePlus -> Str = \noun,num,cas ->
|
||||
caseplus2nf : ResEst.Noun -> ResEst.Number -> CasePlus -> Str = \noun,num,cas ->
|
||||
noun.s ! NCase num cas.c ++ cas.suf ;
|
||||
|
||||
caseplus2af : (AForm => Str) -> ResEst.Number -> CasePlus -> Str = \adj,num,cas ->
|
||||
@@ -65,77 +65,77 @@ lin
|
||||
InflectionV v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP v)) ;
|
||||
paragraph (verbExample (S.mkCl S.she_NP <lin V v : V>)) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2 v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP v S.something_NP)) ;
|
||||
paragraph (verbExample (S.mkCl S.she_NP <lin V2 v : V2> S.something_NP)) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV3 v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP v S.something_NP S.something_NP)) ;
|
||||
paragraph (verbExample (S.mkCl S.she_NP <lin V3 v : V3> S.something_NP S.something_NP)) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2V v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (S.mkVP (L.sleep_V)))) ;
|
||||
paragraph (verbExample (S.mkCl S.she_NP <lin V2V v : V2V> S.we_NP (S.mkVP (L.sleep_V)))) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2S v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (lin S (ss "...")))) ;
|
||||
paragraph (verbExample (S.mkCl S.she_NP <lin V2S v : V2S> S.we_NP (lin S (ss "...")))) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2Q v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (lin QS (ss "...")))) ;
|
||||
paragraph (verbExample (S.mkCl S.she_NP <lin V2Q v : V2Q> S.we_NP (lin QS (ss "...")))) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2A v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP L.beautiful_A)) ;
|
||||
paragraph (verbExample (S.mkCl S.she_NP <lin V2A v : V2A> S.we_NP L.beautiful_A)) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionVV v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP v (S.mkVP (L.sleep_V)))) ;
|
||||
paragraph (verbExample (S.mkCl S.she_NP <lin VV v : VV> (S.mkVP (L.sleep_V)))) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionVS v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP v (lin S (ss "...")))) ;
|
||||
paragraph (verbExample (S.mkCl S.she_NP <lin VS v : VS> (lin S (ss "...")))) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionVQ v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP v (lin QS (ss "...")))) ;
|
||||
paragraph (verbExample (S.mkCl S.she_NP <lin VQ v : VQ> (lin QS (ss "...")))) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionVA v = {
|
||||
t = "v" ;
|
||||
s1 = heading1 (heading verb_Category) ++
|
||||
paragraph (verbExample (S.mkCl S.she_NP v L.beautiful_A)) ;
|
||||
paragraph (verbExample (S.mkCl S.she_NP <lin VA v : VA> L.beautiful_A)) ;
|
||||
s2 = inflVerb v
|
||||
} ;
|
||||
|
||||
@@ -143,16 +143,15 @@ oper
|
||||
verbExample : CatEst.Cl -> Str = \cl -> (S.mkUtt cl).s ;
|
||||
{-
|
||||
-} --# notpresent
|
||||
inflVerb : CatEst.V -> Str = \verb ->
|
||||
inflVerb : ResEst.Verb -> Str = \verb ->
|
||||
let
|
||||
--verb = sverb2verbSep verb0 ;
|
||||
vfin : ResEst.VForm -> Str = \f ->
|
||||
verb.s ! f ;
|
||||
vinf : ResEst.InfForms -> Str = \if ->
|
||||
applyInfFormsV if verb.s ;
|
||||
|
||||
nounNounHeading : Parameter -> Parameter -> Str = \n1,n2 ->
|
||||
(S.mkUtt (G.PossNP (S.mkCN n1) (S.mkNP n2))).s ;
|
||||
(S.mkUtt (G.PossNP (S.mkCN <lin N n1 : N>) (S.mkNP <lin N n2 : N>))).s ;
|
||||
in
|
||||
heading3 (nounNounHeading present_Parameter indicative_Parameter) ++
|
||||
frameTable (
|
||||
@@ -254,7 +253,7 @@ oper
|
||||
td (vfin (PastPart Pass )))
|
||||
) ; --}
|
||||
|
||||
inflNoun : (Number -> CasePlus -> Str) -> Str = \nouns ->
|
||||
inflNoun : (ResEst.Number -> CasePlus -> Str) -> Str = \nouns ->
|
||||
frameTable (
|
||||
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++
|
||||
tr (th (heading nominative_Parameter) ++ td (nouns Sg Nominative) ++ td (nouns Pl Nominative)) ++
|
||||
|
||||
@@ -23,7 +23,7 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
|
||||
--- a = RAg (agrP3 num.n)
|
||||
} ;
|
||||
oper
|
||||
caseCN : CasePlus -> NP -> CN -> CN = \c,np,cn -> cn ** {
|
||||
caseCN : CasePlus -> NPhrase -> CNoun -> CNoun = \c,np,cn -> cn ** {
|
||||
s = \\nf => appCompl True Pos (P.casePrep c) np ++ cn.s ! nf
|
||||
} ;
|
||||
|
||||
@@ -38,7 +38,7 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
|
||||
linVPI : InfForms -> LinVPI -> Str = \inf,vpi -> vpi.s ! inf.stem ;
|
||||
|
||||
-- Version that uses InfStem
|
||||
infVPIF : NPForm -> Polarity -> Agr -> VP -> InfStem -> Str = \sc,pol,agr,vp,if ->
|
||||
infVPIF : NPForm -> Polarity -> Agr -> ResEst.VP -> InfStem -> Str = \sc,pol,agr,vp,if ->
|
||||
infVPAnt Simul sc pol agr vp {stem=if ; suf="a"} ;
|
||||
|
||||
lin
|
||||
@@ -145,17 +145,17 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
|
||||
|
||||
ICompExistNP adv np =
|
||||
let subj : Polarity -> Str = \_ -> adv.s ! np.a ;
|
||||
pred : VP = insertObj
|
||||
(\\_,b,_ => linNP (NPCase Nom) np)
|
||||
(predV (verbOlema ** {sc = NPCase Nom})) ;
|
||||
pred : ResEst.VP = insertObj
|
||||
(\\_,b,_ => linNP (NPCase Nom) np)
|
||||
(predV (verbOlema ** {sc = NPCase Nom})) ;
|
||||
in mkClause subj np.a pred ;
|
||||
|
||||
|
||||
IAdvPredNP iadv v np =
|
||||
let subj : Polarity -> Str = \_ -> iadv.s ;
|
||||
pred : VP = insertObj
|
||||
(\\_,b,_ => linNP v.sc np)
|
||||
(predV v) ;
|
||||
pred : ResEst.VP = insertObj
|
||||
(\\_,b,_ => linNP v.sc np)
|
||||
(predV v) ;
|
||||
in mkClause subj np.a pred ;
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
abstract ExtraEstAbs = Extra [
|
||||
GenNP,GenIP,GenRP,
|
||||
PassVPSlash, PassAgentVPSlash,
|
||||
GenNP,GenIP,GenRP,IP,IQuant,Num,CN,RP,
|
||||
PassVPSlash, PassAgentVPSlash, VPSlash,
|
||||
VPI,ListVPI,BaseVPI,ConsVPI,MkVPI,ComplVPIVV,ConjVPI,
|
||||
VPS,ListVPS,BaseVPS,ConsVPS,ConjVPS,MkVPS,PredVPS,ConjVPS,Tense,Temp,Pol,S,
|
||||
VV,VP,Conj,NP,Quant,IAdv,IComp,ICompAP,IAdvAdv,Adv,AP, Pron, ProDrop] ** {
|
||||
|
||||
@@ -13,8 +13,8 @@ concrete IdiomEst of Idiom = CatEst **
|
||||
|
||||
ExistIP ip =
|
||||
let cas : NPForm = NPCase Nom ; ---- also partitive in Extra
|
||||
vp : VP = insertObj (\\_,b,_ => "olemas") (predV olla) ;
|
||||
subj : NP = ip ** {isPron = False ; a = agrP3 ip.n} ;
|
||||
vp : MorphoEst.VP = insertObj (\\_,b,_ => "olemas") (predV olla) ;
|
||||
subj : MorphoEst.NPhrase = ip ** {isPron = False ; a = agrP3 ip.n} ;
|
||||
in existClause (subjForm subj cas) (agrP3 Sg) vp ;
|
||||
|
||||
-- Notice the nominative in the cleft $NP$: "se on Matti josta Liisa pitää"
|
||||
|
||||
@@ -216,8 +216,7 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
||||
|
||||
oper
|
||||
numN : NForm -> Number = \nf -> case nf of {
|
||||
NCase n _ => n ;
|
||||
_ => Sg ---
|
||||
NCase n _ => n
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ oper
|
||||
}
|
||||
} ;
|
||||
|
||||
nBIND : Number -> Str = \n -> case n of {Sg => [] ; _ => BIND} ; -- no BIND after silent 1
|
||||
nBIND : MorphoEst.Number -> Str = \n -> case n of {Sg => [] ; _ => BIND} ; -- no BIND after silent 1
|
||||
|
||||
param
|
||||
NumPlace = NumIndep | NumAttr ;
|
||||
|
||||
@@ -617,9 +617,10 @@ oper
|
||||
mkA : N -> A = \n -> noun2adjDeg n ** {infl = Regular} ;
|
||||
mkA : N -> (parem,parim : Str) -> A = regAdjective ;
|
||||
mkA : N -> (infl : Infl) -> A = \n,infl -> noun2adjDeg n ** {infl = infl} ;
|
||||
-- TODO: temporary usage of regAdjective1
|
||||
mkA : N -> (valmim,valmeim : Str) -> (infl : Infl) -> A =
|
||||
\n,c,s,infl -> (regAdjective1 n c s) ** {infl = infl} ;
|
||||
\n,c,s,infl ->
|
||||
let regA : A = regAdjective n c s
|
||||
in regA ** {infl = infl} ;
|
||||
} ;
|
||||
|
||||
invA balti = lin A {s = \\_,_ => balti ; infl = Invariable} ;
|
||||
@@ -644,11 +645,6 @@ oper
|
||||
(noun2adjComp False (nForms2N (hjk_type_IVb_audit compar "a")))
|
||||
(noun2adjComp False (nForms2N (hjk_type_IVb_audit superl "a"))) ;
|
||||
|
||||
-- TODO: this is a temporary hack that converts A ~> Adjective.
|
||||
-- The caller needs this otherwise ** fails.
|
||||
-- This should be cleaned up but I don't know how (K).
|
||||
regAdjective1 : Noun -> Str -> Str -> Adjective = regAdjective ;
|
||||
|
||||
-- Adjectives whose comparison forms can be derived from the sg gen.
|
||||
-- In case of comparative this fails only for 70 adjectives.
|
||||
-- Superlative is more complex, and does not always exist,
|
||||
|
||||
@@ -91,7 +91,7 @@ lin
|
||||
nounHeading n = ss (n.s ! NCase Sg Nom) ;
|
||||
nounPluralHeading n = ss (n.s ! NCase Pl Nom) ;
|
||||
|
||||
formGF_N = mkN "vorm" ;
|
||||
formGr_N = mkN "vorm" ;
|
||||
exampleGr_N = mkN "näide" ;
|
||||
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ concrete VerbEst of Verb = CatEst ** open Prelude, ResEst in {
|
||||
|
||||
ReflVP v = insertObjPre (\\fin,b,agr => appCompl fin b v.c2 (reflPron agr)) v ;
|
||||
|
||||
PassV2 v = let vp : VP = passiveVP (predV v) in vp ** {
|
||||
PassV2 v = let vp : ResEst.VP = passiveVP (predV v) in vp ** {
|
||||
sc = compl2subjcase v.c2 -- koer valitakse ; koerale räägitakse
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user