mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
Merge pull request #372 from inariksit/morphodict-eng
Remove "more" + "most" from the inflection table of A*
This commit is contained in:
@@ -7,11 +7,11 @@ concrete AdjectiveEng of Adjective = CatEng ** open ResEng, Prelude in {
|
||||
isPre = a.isPre
|
||||
} ;
|
||||
ComparA a np = {
|
||||
s = \\_ => a.s ! AAdj Compar Nom ++ "than" ++ np.s ! npNom ;
|
||||
s = \\_ => getCompar Nom a ++ "than" ++ np.s ! npNom ;
|
||||
isPre = False
|
||||
} ;
|
||||
UseComparA a = {
|
||||
s = \\_ => a.s ! AAdj Compar Nom ;
|
||||
s = \\_ => getCompar Nom a ;
|
||||
isPre = a.isPre
|
||||
} ;
|
||||
|
||||
@@ -21,22 +21,22 @@ concrete AdjectiveEng of Adjective = CatEng ** open ResEng, Prelude in {
|
||||
} ;
|
||||
|
||||
CAdvAP ad ap np = {
|
||||
s = \\a => ad.s ! Pos ++ ap.s ! a ++ ad.p ++ np.s ! npNom ;
|
||||
s = \\a => ad.s ! Pos ++ ap.s ! a ++ ad.p ++ np.s ! npNom ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
ComplA2 a np = {
|
||||
s = \\_ => a.s ! AAdj Posit Nom ++ a.c2 ++ np.s ! NPAcc ;
|
||||
s = \\_ => a.s ! AAdj Posit Nom ++ a.c2 ++ np.s ! NPAcc ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
ReflA2 a = {
|
||||
s = \\ag => a.s ! AAdj Posit Nom ++ a.c2 ++ reflPron ! ag ;
|
||||
s = \\ag => a.s ! AAdj Posit Nom ++ a.c2 ++ reflPron ! ag ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
SentAP ap sc = {
|
||||
s = \\a => ap.s ! a ++ sc.s ;
|
||||
s = \\a => ap.s ! a ++ sc.s ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
|
||||
@@ -10,44 +10,44 @@ concrete BackwardEng of Backward = CatEng ** open ResEng in {
|
||||
-- from Verb 19/4/2008
|
||||
|
||||
ComplV2 v np = insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v) ;
|
||||
ComplV3 v np np2 =
|
||||
ComplV3 v np np2 =
|
||||
insertObj (\\_ => v.c2 ++ np.s ! Acc ++ v.c3 ++ np2.s ! Acc) (predV v) ;
|
||||
ComplV2V v np vp =
|
||||
ComplV2V v np vp =
|
||||
insertObj (\\a => infVP v.isAux vp False Simul CPos a)
|
||||
(insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ;
|
||||
ComplV2S v np s =
|
||||
ComplV2S v np s =
|
||||
insertObj (\\_ => conjThat ++ s.s)
|
||||
(insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ;
|
||||
ComplV2Q v np q =
|
||||
insertObj (\\_ => q.s ! QIndir)
|
||||
ComplV2Q v np q =
|
||||
insertObj (\\_ => q.s ! QIndir)
|
||||
(insertObj (\\_ => v.c2 ++ np.s ! Acc) (predV v)) ;
|
||||
ComplV2A v np ap =
|
||||
ComplV2A v np ap =
|
||||
insertObj (\\_ => v.c2 ++ np.s ! Acc ++ ap.s ! np.a) (predV v) ;
|
||||
|
||||
ReflV2 v = insertObj (\\a => v.c2 ++ reflPron ! a) (predV v) ;
|
||||
|
||||
-- from Sentence 19/4/2008
|
||||
|
||||
SlashV2 np v2 =
|
||||
SlashV2 np v2 =
|
||||
mkClause (np.s ! Nom) np.a (predV v2) ** {c2 = v2.c2} ;
|
||||
|
||||
SlashVVV2 np vv v2 =
|
||||
mkClause (np.s ! Nom) np.a
|
||||
SlashVVV2 np vv v2 =
|
||||
mkClause (np.s ! Nom) np.a
|
||||
(insertObj (\\a => infVP vv.isAux (predV v2) False Simul CPos a) (predVV vv)) **
|
||||
{c2 = v2.c2} ;
|
||||
|
||||
-- from Noun 19/4/2008
|
||||
|
||||
NumInt n = {s = n.s ; n = Pl} ;
|
||||
NumInt n = {s = n.s ; n = Pl} ;
|
||||
OrdInt n = {s = n.s ++ "th"} ; --- DEPRECATED
|
||||
|
||||
DetSg quant ord = {
|
||||
s = quant.s ! Sg ++ ord.s ;
|
||||
s = quant.s ! Sg ++ ord.s ;
|
||||
n = Sg
|
||||
} ;
|
||||
|
||||
DetPl quant num ord = {
|
||||
s = quant.s ! num.n ++ num.s ++ ord.s ;
|
||||
s = quant.s ! num.n ++ num.s ++ ord.s ;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
@@ -57,7 +57,7 @@ concrete BackwardEng of Backward = CatEng ** open ResEng in {
|
||||
|
||||
IndefArt = {
|
||||
s = table {
|
||||
Sg => artIndef ;
|
||||
Sg => artIndef ;
|
||||
Pl => []
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -28,14 +28,14 @@ concrete CatEng of Cat = CommonX - [Pol,CAdv] ** open ResEng, Prelude in {
|
||||
|
||||
QCl = {s : ResEng.Tense => Anteriority => CPolarity => QForm => Str} ;
|
||||
IP = {s : NPCase => Str ; n : Number} ;
|
||||
IComp = {s : Str} ;
|
||||
IComp = {s : Str} ;
|
||||
IDet = {s : Str ; n : Number} ;
|
||||
IQuant = {s : Number => Str} ;
|
||||
|
||||
-- Relative
|
||||
|
||||
RCl = {
|
||||
s : ResEng.Tense => Anteriority => CPolarity => Agr => Str ;
|
||||
s : ResEng.Tense => Anteriority => CPolarity => Agr => Str ;
|
||||
c : NPCase
|
||||
} ;
|
||||
RP = {s : RCase => Str ; a : RAgr} ;
|
||||
@@ -44,11 +44,11 @@ concrete CatEng of Cat = CommonX - [Pol,CAdv] ** open ResEng, Prelude in {
|
||||
|
||||
VP = ResEng.VP ;
|
||||
VPSlash = ResEng.SlashVP ;
|
||||
Comp = {s : Agr => Str} ;
|
||||
Comp = {s : Agr => Str} ;
|
||||
|
||||
-- Adjective
|
||||
|
||||
AP = {s : Agr => Str ; isPre : Bool} ;
|
||||
AP = {s : Agr => Str ; isPre : Bool} ;
|
||||
|
||||
-- Noun
|
||||
|
||||
@@ -97,8 +97,8 @@ concrete CatEng of Cat = CommonX - [Pol,CAdv] ** open ResEng, Prelude in {
|
||||
VV = {s : VVForm => Str ; p : Str ; typ : VVType} ;
|
||||
V2V = Verb ** {c2,c3 : Str ; typ : VVType} ;
|
||||
|
||||
A = {s : AForm => Str ; isPre : Bool} ;
|
||||
A2 = {s : AForm => Str ; c2 : Str ; isPre : Bool} ;
|
||||
A = ResEng.Adjective ;
|
||||
A2 = ResEng.Adjective ** {c2 : Str} ;
|
||||
|
||||
N = {s : Number => Case => Str ; g : Gender} ;
|
||||
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str} ;
|
||||
@@ -118,8 +118,8 @@ concrete CatEng of Cat = CommonX - [Pol,CAdv] ** open ResEng, Prelude in {
|
||||
VV = \s -> {s = \\_ => s; p = ""; isRefl = False; typ = VVInf} ;
|
||||
V2V = \s -> {s = \\_ => s; p = ""; isRefl = False; c2,c3="" ; typ = VVInf} ;
|
||||
|
||||
A = \s -> {s = \\_ => s; isPre = True} ;
|
||||
A2 = \s -> {s = \\_ => s; c2 = ""; isPre = True} ;
|
||||
A = \s -> {s = \\_ => s; isPre = True ; isMost = False} ;
|
||||
A2 = \s -> {s = \\_ => s; c2 = ""; isPre = True ; isMost = False} ;
|
||||
|
||||
N = \s -> {s = \\_,_ => s; g = Neutr} ;
|
||||
N2 = \s -> {s = \\_,_ => s; c2 = ""; g = Neutr} ;
|
||||
|
||||
@@ -5,13 +5,13 @@ concrete CompatibilityEng of Compatibility = CatEng ** open Prelude, ResEng in {
|
||||
-- from Noun 19/4/2008
|
||||
|
||||
lin
|
||||
NumInt n = {s,sp = \\_ => addGenitiveS n.s ; n = Pl ; hasCard = True} ;
|
||||
NumInt n = {s,sp = \\_ => addGenitiveS n.s ; n = Pl ; hasCard = True} ;
|
||||
OrdInt n = {s = \\c => n.s ++ (regGenitiveS "th")!c } ;
|
||||
|
||||
oper
|
||||
-- Note: this results in a space before 's, but there's
|
||||
-- not mauch we can do about that.
|
||||
addGenitiveS : Str -> Case => Str = \s ->
|
||||
addGenitiveS : Str -> Case => Str = \s ->
|
||||
table { Gen => s ++ "'s"; _ => s } ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
concrete ConjunctionEng of Conjunction =
|
||||
concrete ConjunctionEng of Conjunction =
|
||||
CatEng ** open ResEng, Coordination, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
@@ -22,11 +22,11 @@ concrete ConjunctionEng of Conjunction =
|
||||
c = ss.c
|
||||
} ;
|
||||
|
||||
ConjIAdv = conjunctDistrSS ;
|
||||
ConjIAdv = conjunctDistrSS ;
|
||||
|
||||
ConjCN co ns = conjunctDistrTable2 Number Case co ns ** {g = Neutr} ; --- gender?
|
||||
|
||||
ConjDet c xs = let cxs = (conjunctDistrSS c xs).s in {s = cxs ; sp = \\_,_,_ => cxs ++ "one" ; hasNum = False ; n = xs.n} ;
|
||||
ConjDet c xs = let cxs = (conjunctDistrSS c xs).s in {s = cxs ; sp = \\_,_,_ => cxs ++ "one" ; hasNum = False ; n = xs.n} ;
|
||||
|
||||
-- These fun's are generated from the list cat's.
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@ lin
|
||||
s2 = frameTable (
|
||||
tr (th "" ++ th "nom" ++ th "gen") ++
|
||||
tr (th "posit" ++ td (adj.s ! AAdj Posit Nom) ++ td (adj.s ! AAdj Posit Gen)) ++
|
||||
tr (th "compar" ++ td (adj.s ! AAdj Compar Nom) ++ td (adj.s ! AAdj Compar Gen)) ++
|
||||
tr (th "superl" ++ td (adj.s ! AAdj Superl Nom) ++ td (adj.s ! AAdj Superl Gen))
|
||||
tr (th "compar" ++ td (getCompar Nom adj) ++ td (getCompar Gen adj)) ++
|
||||
tr (th "superl" ++ td (getSuperl Nom adj) ++ td (getSuperl Gen adj))
|
||||
) ++
|
||||
heading1 "Adverb" ++
|
||||
paragraph (adj.s ! AAdv)
|
||||
@@ -83,7 +83,7 @@ lin
|
||||
|
||||
InflectionV3 v = {
|
||||
t = "v" ;
|
||||
s1= heading1 "Verb" ++
|
||||
s1= heading1 "Verb" ++
|
||||
paragraph (pp "subject" ++
|
||||
v.s ! VInf ++ v.p ++
|
||||
v.c2 ++ pp "arg1" ++
|
||||
@@ -93,7 +93,7 @@ lin
|
||||
|
||||
InflectionV2V v = {
|
||||
t = "v" ;
|
||||
s1= heading1 "Verb" ++
|
||||
s1= heading1 "Verb" ++
|
||||
paragraph (pp "subject" ++
|
||||
v.s ! VInf ++ v.p ++
|
||||
v.c2 ++ pp "object" ++
|
||||
@@ -107,7 +107,7 @@ lin
|
||||
|
||||
InflectionV2S v = {
|
||||
t = "v" ;
|
||||
s1= heading1 "Verb" ++
|
||||
s1= heading1 "Verb" ++
|
||||
paragraph (pp "subject" ++
|
||||
v.s ! VInf ++ v.p ++
|
||||
v.c2 ++ pp "object" ++
|
||||
@@ -117,7 +117,7 @@ lin
|
||||
|
||||
InflectionV2Q v = {
|
||||
t = "v" ;
|
||||
s1= heading1 "Verb" ++
|
||||
s1= heading1 "Verb" ++
|
||||
paragraph (pp "subject" ++
|
||||
v.s ! VInf ++ v.p ++
|
||||
pp "question") ;
|
||||
@@ -126,7 +126,7 @@ lin
|
||||
|
||||
InflectionV2A v = {
|
||||
t = "v" ;
|
||||
s1= heading1 "Verb" ++
|
||||
s1= heading1 "Verb" ++
|
||||
paragraph (pp "subject" ++
|
||||
v.s ! VInf ++ v.p ++
|
||||
v.c2 ++ pp "object" ++
|
||||
@@ -136,7 +136,7 @@ lin
|
||||
|
||||
InflectionVV v = {
|
||||
t = "v" ;
|
||||
s1= heading1 "Verb" ++
|
||||
s1= heading1 "Verb" ++
|
||||
paragraph (pp "subject" ++
|
||||
v.s ! VVF VInf ++ v.p ++
|
||||
case v.typ of {
|
||||
@@ -155,7 +155,7 @@ lin
|
||||
|
||||
InflectionVS v = {
|
||||
t = "v" ;
|
||||
s1= heading1 "Verb" ++
|
||||
s1= heading1 "Verb" ++
|
||||
paragraph (pp "subject" ++
|
||||
v.s ! VInf ++ v.p ++
|
||||
"that" ++ pp "sentence") ;
|
||||
@@ -164,7 +164,7 @@ lin
|
||||
|
||||
InflectionVQ v = {
|
||||
t = "v" ;
|
||||
s1= heading1 "Verb" ++
|
||||
s1= heading1 "Verb" ++
|
||||
paragraph (pp "subject" ++
|
||||
v.s ! VInf ++ v.p ++
|
||||
pp "question") ;
|
||||
@@ -173,7 +173,7 @@ lin
|
||||
|
||||
InflectionVA v = {
|
||||
t = "v" ;
|
||||
s1= heading1 "Verb" ++
|
||||
s1= heading1 "Verb" ++
|
||||
paragraph (pp "subject" ++
|
||||
v.s ! VInf ++ v.p ++
|
||||
pp "adjective") ;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
-- documentation of English in any language instantiating Terminology
|
||||
|
||||
incomplete concrete DocumentationEngFunctor of Documentation = CatEng ** open
|
||||
incomplete concrete DocumentationEngFunctor of Documentation = CatEng ** open
|
||||
Terminology,
|
||||
ResEng,
|
||||
ParadigmsEng,
|
||||
@@ -16,18 +16,18 @@ in {
|
||||
|
||||
lincat
|
||||
Inflection = {s1,s2 : Str} ;
|
||||
Document = {s : Str} ;
|
||||
|
||||
Document = {s : Str} ;
|
||||
|
||||
oper
|
||||
tdf : Str -> Str = \s -> td (intag "i" s) ;
|
||||
heading : N -> Str = \n -> (nounHeading n).s ;
|
||||
lin
|
||||
InflectionN noun = {
|
||||
s1 = heading1 (heading noun_Category) ;
|
||||
s2 = frameTable (
|
||||
s2 = frameTable (
|
||||
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++
|
||||
tr (th (heading nominative_Parameter) ++ tdf (noun.s ! Sg ! Nom) ++ tdf (noun.s ! Pl ! Nom)) ++
|
||||
tr (th (heading genitive_Parameter) ++ tdf (noun.s ! Sg ! Gen) ++ tdf (noun.s ! Pl ! Gen))
|
||||
tr (th (heading genitive_Parameter) ++ tdf (noun.s ! Sg ! Gen) ++ tdf (noun.s ! Pl ! Gen))
|
||||
)
|
||||
} ;
|
||||
|
||||
@@ -35,26 +35,26 @@ lin
|
||||
s1 = heading1 (heading adjective_Category) ;
|
||||
s2 = frameTable (
|
||||
tr (th (heading positive_Parameter) ++ tdf (adj.s ! AAdj Posit Nom)) ++
|
||||
tr (th (heading comparative_Parameter) ++ tdf (adj.s ! AAdj Compar Nom)) ++
|
||||
tr (th (heading superlative_Parameter) ++ tdf (adj.s ! AAdj Superl Nom)) ++
|
||||
tr (th (heading adverb_Category) ++ tdf (adj.s ! AAdv))
|
||||
tr (th (heading comparative_Parameter) ++ tdf (getCompar Nom adj)) ++
|
||||
tr (th (heading superlative_Parameter) ++ tdf (getSuperl Nom adj)) ++
|
||||
tr (th (heading adverb_Category) ++ tdf (adj.s ! AAdv))
|
||||
)
|
||||
} ;
|
||||
|
||||
InflectionV v = {
|
||||
s1= heading1 (heading verb_Category) ++
|
||||
s1= heading1 (heading verb_Category) ++
|
||||
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" (verbExample (S.mkCl S.she_NP (lin V v)))) ;
|
||||
s2= inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2 v = {
|
||||
s1= heading1 (heading verb_Category) ++
|
||||
s1= heading1 (heading verb_Category) ++
|
||||
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" (verbExample (S.mkCl S.she_NP (lin V2 v) S.something_NP))) ;
|
||||
s2= inflVerb v
|
||||
} ;
|
||||
|
||||
InflectionV2V v = {
|
||||
s1= heading1 (heading verb_Category) ++
|
||||
s1= heading1 (heading verb_Category) ++
|
||||
paragraph (intag "b" (heading exampleGr_N ++ ":") ++ intag "i" (verbExample (S.mkCl S.she_NP (lin V2V v) S.we_NP (S.mkVP (L.sleep_V))))) ;
|
||||
s2= inflVerb v
|
||||
} ;
|
||||
@@ -63,7 +63,7 @@ lin
|
||||
|
||||
MkDocument b i e = ss (i.s1 ++ "<p style=\"font-size:20px\">"++b.s++"</p>" ++ i.s2 ++ paragraph e.s) ;
|
||||
|
||||
oper
|
||||
oper
|
||||
verbExample : CatEng.Cl -> Str = \cl -> (S.mkUtt cl).s ;
|
||||
|
||||
inflVerb : Verb -> Str = \verb ->
|
||||
@@ -72,7 +72,7 @@ oper
|
||||
tr (th (heading present_Parameter) ++ tdf (verb.s ! VPres)) ++
|
||||
tr (th (heading past_Parameter) ++ tdf (verb.s ! VPast)) ++ --# notpresent
|
||||
tr (th (heading past_Parameter ++ heading participle_Parameter) ++ tdf (verb.s ! VPPart)) ++
|
||||
tr (th (heading present_Parameter ++ heading participle_Parameter) ++ tdf (verb.s ! VPresPart))
|
||||
tr (th (heading present_Parameter ++ heading participle_Parameter) ++ tdf (verb.s ! VPresPart))
|
||||
) ;
|
||||
|
||||
}
|
||||
|
||||
@@ -416,7 +416,7 @@ lin BaseImp = twoTable2 CPolarity ImpForm ;
|
||||
AdvRAP ap prep rnp = {s = \\a => ap.s ! a ++ prep.s ++ rnp.s ! a ; isPre = False} ;
|
||||
|
||||
ReflA2RNP a rnp = {
|
||||
s = \\ag => a.s ! AAdj Posit Nom ++ a.c2 ++ rnp.s ! ag ;
|
||||
s = \\ag => a.s ! AAdj Posit Nom ++ a.c2 ++ rnp.s ! ag ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
concrete ExtraEng of ExtraEngAbs = CatEng **
|
||||
concrete ExtraEng of ExtraEngAbs = CatEng **
|
||||
open ResEng, Coordination, Prelude, MorphoEng, ParadigmsEng in {
|
||||
|
||||
lin
|
||||
GenNP np = {s = \\_,_ => np.s ! npGen ; sp = \\_,_,_,_ => np.s ! npGen; isDef = True} ;
|
||||
GenIP ip = {s = \\_ => ip.s ! NCase Gen} ;
|
||||
GenRP nu cn = {
|
||||
s = \\c => "whose" ++ nu.s ! False ! Nom ++
|
||||
s = \\c => "whose" ++ nu.s ! False ! Nom ++
|
||||
case c of {
|
||||
RC _ (NCase Gen) => cn.s ! nu.n ! Gen ;
|
||||
_ => cn.s ! nu.n ! Nom
|
||||
@@ -14,12 +14,12 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
||||
} ;
|
||||
|
||||
PiedPipingRelSlash rp slash = {
|
||||
s = \\t,a,p,agr =>
|
||||
s = \\t,a,p,agr =>
|
||||
slash.c2 ++ rp.s ! RPrep (fromAgr agr).g ++ slash.s ! t ! a ! p ! oDir ;
|
||||
c = NPAcc
|
||||
} ;
|
||||
StrandRelSlash rp slash = {
|
||||
s = \\t,a,p,ag =>
|
||||
s = \\t,a,p,ag =>
|
||||
rp.s ! RC (fromAgr ag).g NPAcc ++ slash.s ! t ! a ! p ! oDir ++ slash.c2 ;
|
||||
c = NPAcc
|
||||
} ;
|
||||
@@ -28,11 +28,11 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
||||
c = NPAcc
|
||||
} ;
|
||||
|
||||
PiedPipingQuestSlash ip slash =
|
||||
PiedPipingQuestSlash ip slash =
|
||||
mkQuestion (ss (slash.c2 ++ ip.s ! NPAcc)) slash ;
|
||||
|
||||
StrandQuestSlash ip slash =
|
||||
{s = \\t,a,b,q =>
|
||||
StrandQuestSlash ip slash =
|
||||
{s = \\t,a,b,q =>
|
||||
(mkQuestion (ss (ip.s ! NPAcc)) slash).s ! t ! a ! b ! q ++ slash.c2
|
||||
};
|
||||
|
||||
@@ -52,7 +52,7 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
||||
}
|
||||
} ;
|
||||
ConjVPI = conjunctDistrTable2 VVType Agr ;
|
||||
ComplVPIVV vv vpi =
|
||||
ComplVPIVV vv vpi =
|
||||
insertObj (\\a => vpi.s ! vv.typ ! a) (predVV vv) ;
|
||||
|
||||
lin
|
||||
@@ -73,8 +73,8 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
||||
PredVPS np vpi = {s = np.s ! npNom ++ vpi.s ! np.a} ;
|
||||
|
||||
MkVPS t p vp = {
|
||||
s = \\a =>
|
||||
let
|
||||
s = \\a =>
|
||||
let
|
||||
verb = vp.s ! t.t ! t.a ! p.p ! oDir ! a ;
|
||||
verbf = verb.aux ++ verb.adv ++ verb.fin ++ verb.inf ;
|
||||
in t.s ++ p.s ++ vp.ad ! a ++ verbf ++ vp.p ++ vp.s2 ! a ++ vp.ext
|
||||
@@ -110,7 +110,7 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
||||
} ;
|
||||
|
||||
may_VV = lin VV {
|
||||
s = table {
|
||||
s = table {
|
||||
VVF VInf => ["be allowed to"] ;
|
||||
VVF VPres => "may" ;
|
||||
VVF VPPart => ["been allowed to"] ;
|
||||
@@ -124,21 +124,21 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
||||
} ;
|
||||
|
||||
shall_VV = lin VV {
|
||||
s = table {
|
||||
s = table {
|
||||
VVF VInf => ["be obliged to"] ; ---
|
||||
VVF VPres => "shall" ;
|
||||
VVF VPPart => ["been obliged to"] ;
|
||||
VVF VPresPart => ["being obliged to"] ;
|
||||
VVF VPast => "should" ; --# notpresent
|
||||
VVPastNeg => "shouldn't" ; --# notpresent
|
||||
VVPresNeg => "shan't"
|
||||
VVPresNeg => "shan't"
|
||||
} ;
|
||||
p = [] ;
|
||||
typ = VVAux
|
||||
} ;
|
||||
|
||||
ought_VV = lin VV {
|
||||
s = table {
|
||||
s = table {
|
||||
VVF VInf => ["be obliged to"] ; ---
|
||||
VVF VPres => "ought to" ;
|
||||
VVF VPPart => ["been obliged to"] ;
|
||||
@@ -152,37 +152,37 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
||||
} ;
|
||||
|
||||
used_VV = lin VV {
|
||||
s = table {
|
||||
s = table {
|
||||
VVF VInf => Predef.nonExist ; ---
|
||||
VVF VPres => Predef.nonExist ;
|
||||
VVF VPPart => ["used to"] ;
|
||||
VVF VPresPart => ["being used to"] ;
|
||||
VVF VPast => "used to" ; --# notpresent
|
||||
VVPastNeg => "used not to" ; --# notpresent
|
||||
VVPresNeg => Predef.nonExist
|
||||
VVPresNeg => Predef.nonExist
|
||||
} ;
|
||||
p = [] ;
|
||||
typ = VVAux
|
||||
} ;
|
||||
|
||||
|
||||
NominalizeVPSlashNP vpslash np =
|
||||
NominalizeVPSlashNP vpslash np =
|
||||
let vp : ResEng.VP = insertObjPre (\\_ => vpslash.c2 ++ np.s ! NPAcc) vpslash ;
|
||||
a = AgP3Sg Neutr
|
||||
in
|
||||
lin NP {s = \\_ => vp.ad ! a ++ vp.prp ++ vp.s2 ! a ; a = a} ;
|
||||
in
|
||||
lin NP {s = \\_ => vp.ad ! a ++ vp.prp ++ vp.s2 ! a ; a = a} ;
|
||||
|
||||
lin
|
||||
UncNeg = {s = [] ; p = CNeg False} ;
|
||||
UncNeg = {s = [] ; p = CNeg False} ;
|
||||
|
||||
oper passVPSlash : VPSlash -> Str -> ResEng.VP =
|
||||
\vps,ag ->
|
||||
let
|
||||
oper passVPSlash : VPSlash -> Str -> ResEng.VP =
|
||||
\vps,ag ->
|
||||
let
|
||||
be = predAux auxBe ;
|
||||
ppt = vps.ptp
|
||||
in {
|
||||
s = be.s ;
|
||||
p = [] ;
|
||||
p = [] ;
|
||||
prp = be.prp ;
|
||||
ptp = be.ptp ;
|
||||
inf = be.inf ;
|
||||
@@ -192,7 +192,7 @@ lin
|
||||
ext = vps.ext
|
||||
} ;
|
||||
|
||||
lin
|
||||
lin
|
||||
PassVPSlash vps = passVPSlash vps [] ;
|
||||
PassAgentVPSlash vps np = passVPSlash vps ("by" ++ np.s ! NPAcc) ;
|
||||
|
||||
@@ -202,8 +202,8 @@ lin
|
||||
} ;
|
||||
|
||||
--- AR 22/5/2013
|
||||
ExistsNP np =
|
||||
mkClause "there" (agrP3 (fromAgr np.a).n)
|
||||
ExistsNP np =
|
||||
mkClause "there" (agrP3 (fromAgr np.a).n)
|
||||
(insertObj (\\_ => np.s ! NPAcc) (predV (regV "exist"))) ;
|
||||
|
||||
PurposeVP vp = {s = infVP VVInf vp False Simul CPos (agrP3 Sg)} ; --- agr
|
||||
@@ -238,8 +238,8 @@ lin
|
||||
CompoundCN a b = {s = \\n,c => a.s ! Sg ! Nom ++ b.s ! n ! c ; g = b.g} ;
|
||||
|
||||
FrontExtPredVP np vp = {
|
||||
s = \\t,a,b,o =>
|
||||
let
|
||||
s = \\t,a,b,o =>
|
||||
let
|
||||
subj = np.s ! npNom ;
|
||||
agr = np.a ;
|
||||
verb = vp.s ! t ! a ! b ! o ! agr ;
|
||||
@@ -252,8 +252,8 @@ lin
|
||||
} ;
|
||||
|
||||
InvFrontExtPredVP np vp = {
|
||||
s = \\t,a,b,o =>
|
||||
let
|
||||
s = \\t,a,b,o =>
|
||||
let
|
||||
subj = np.s ! npNom ;
|
||||
agr = np.a ;
|
||||
verb = vp.s ! t ! a ! b ! o ! agr ;
|
||||
@@ -269,7 +269,7 @@ lin
|
||||
|
||||
oper
|
||||
unc : CPolarity -> CPolarity = \x -> case x of {
|
||||
CNeg _ => CNeg False ;
|
||||
CNeg _ => CNeg False ;
|
||||
_ => x
|
||||
} ;
|
||||
-------
|
||||
@@ -285,7 +285,7 @@ lin
|
||||
RNP = {s : Agr => Str} ;
|
||||
RNPList = {s1,s2 : Agr => Str} ;
|
||||
|
||||
lin
|
||||
lin
|
||||
ReflRNP vps rnp = insertObjPre (\\a => vps.c2 ++ rnp.s ! a) vps ;
|
||||
ReflPron = {s = reflPron} ;
|
||||
ReflPoss num cn = {s = \\a => possPron ! a ++ num.s ! True ! Nom ++ cn.s ! num.n ! Nom} ;
|
||||
@@ -299,7 +299,7 @@ lin
|
||||
Cons_rr_RNP x xs = consrTable Agr comma x xs ;
|
||||
Cons_nr_RNP x xs = consrTable Agr comma {s = \\a => x.s ! NPAcc} xs ;
|
||||
|
||||
|
||||
|
||||
---- TODO: RNPList construction
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@ lin
|
||||
|
||||
that_RP =
|
||||
{ s = table {
|
||||
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
|
||||
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
|
||||
RC Neutr _ => "that" ;
|
||||
RC _ NPAcc => "that" ;
|
||||
RC _ (NCase Nom) => "that" ;
|
||||
@@ -319,7 +319,7 @@ lin
|
||||
|
||||
which_who_RP =
|
||||
{ s = table {
|
||||
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
|
||||
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
|
||||
RC Neutr _ => "which" ;
|
||||
RC _ NPAcc => "whom" ;
|
||||
RC _ (NCase Nom) => "who" ;
|
||||
@@ -328,18 +328,18 @@ lin
|
||||
} ;
|
||||
a = RNoAg
|
||||
} ;
|
||||
|
||||
|
||||
who_RP =
|
||||
{ s = table {
|
||||
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
|
||||
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
|
||||
_ => "who"
|
||||
} ;
|
||||
a = RNoAg
|
||||
} ;
|
||||
|
||||
|
||||
which_RP =
|
||||
{ s = table {
|
||||
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
|
||||
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
|
||||
_ => "which"
|
||||
} ;
|
||||
a = RNoAg
|
||||
@@ -347,7 +347,7 @@ lin
|
||||
|
||||
emptyRP =
|
||||
{ s = table {
|
||||
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
|
||||
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
|
||||
RC _ NPAcc => [] ;
|
||||
RC _ (NCase Nom) => "that" ;
|
||||
RPrep Neutr => "which" ;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
abstract ExtraEngAbs = Extra - [ProDrop] ** {
|
||||
|
||||
-- uncontracted negative polarity; contracted is the default for PNeg
|
||||
fun
|
||||
fun
|
||||
UncNeg : Pol ;
|
||||
|
||||
-- freely compounded nouns
|
||||
|
||||
CompoundCN : CN -> CN -> CN ; -- rock album
|
||||
|
||||
which_who_RP : RP ; -- "which" / "who" as a relative pronoun (used to be the default for IdRP)
|
||||
which_who_RP : RP ; -- "which" / "who" as a relative pronoun (used to be the default for IdRP)
|
||||
that_RP : RP ; -- "that" as a relational pronoun (since 5/6/2016 default for IdRP)
|
||||
which_RP : RP ; -- force "which"
|
||||
who_RP : RP ; -- force "who" ; in Acc, also "who": "the girl who I saw"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
|
||||
concrete GrammarEng of Grammar =
|
||||
NounEng,
|
||||
VerbEng,
|
||||
concrete GrammarEng of Grammar =
|
||||
NounEng,
|
||||
VerbEng,
|
||||
AdjectiveEng,
|
||||
AdverbEng,
|
||||
NumeralEng,
|
||||
|
||||
@@ -6,28 +6,28 @@ concrete IdiomEng of Idiom = CatEng ** open Prelude, ResEng in {
|
||||
ImpersCl vp = mkClause "it" (agrP3 Sg) vp ;
|
||||
GenericCl vp = mkClause "one" (agrP3 Sg) vp ;
|
||||
|
||||
CleftNP np rs = mkClause "it" (agrP3 Sg)
|
||||
CleftNP np rs = mkClause "it" (agrP3 Sg)
|
||||
(insertObj (\\_ => rs.s ! np.a)
|
||||
(insertObj (\\_ => np.s ! rs.c) (predAux auxBe))) ;
|
||||
|
||||
CleftAdv ad s = mkClause "it" (agrP3 Sg)
|
||||
CleftAdv ad s = mkClause "it" (agrP3 Sg)
|
||||
(insertObj (\\_ => conjThat ++ s.s)
|
||||
(insertObj (\\_ => ad.s) (predAux auxBe))) ;
|
||||
|
||||
ExistNP np =
|
||||
mkClause "there" (agrP3 (fromAgr np.a).n)
|
||||
ExistNP np =
|
||||
mkClause "there" (agrP3 (fromAgr np.a).n)
|
||||
(insertObj (\\_ => np.s ! NPAcc) (predAux auxBe)) ;
|
||||
|
||||
ExistIP ip =
|
||||
mkQuestion (ss (ip.s ! npNom))
|
||||
ExistIP ip =
|
||||
mkQuestion (ss (ip.s ! npNom))
|
||||
(mkClause "there" (agrP3 ip.n) (predAux auxBe)) ;
|
||||
|
||||
ExistNPAdv np adv =
|
||||
mkClause "there" (agrP3 (fromAgr np.a).n)
|
||||
ExistNPAdv np adv =
|
||||
mkClause "there" (agrP3 (fromAgr np.a).n)
|
||||
(insertObj (\\_ => np.s ! NPAcc ++ adv.s) (predAux auxBe)) ;
|
||||
|
||||
ExistIPAdv ip adv =
|
||||
mkQuestion (ss (ip.s ! npNom))
|
||||
ExistIPAdv ip adv =
|
||||
mkQuestion (ss (ip.s ! npNom))
|
||||
(mkClause "there" (agrP3 ip.n) (insertObj (\\_ => adv.s) (predAux auxBe))) ;
|
||||
|
||||
ProgrVP vp = insertObj (\\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a) (predAux auxBe) ;
|
||||
@@ -39,7 +39,7 @@ concrete IdiomEng of Idiom = CatEng ** open Prelude, ResEng in {
|
||||
SelfAdvVP vp = insertObj reflPron vp ;
|
||||
SelfAdVVP vp = insertAdVAgr reflPron vp ;
|
||||
SelfNP np = {
|
||||
s = \\c => np.s ! c ++ reflPron ! np.a ;
|
||||
s = \\c => np.s ! c ++ reflPron ! np.a ;
|
||||
a = np.a
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--# -path=.:../abstract:../common:../api:../prelude
|
||||
|
||||
concrete LangEng of Lang =
|
||||
concrete LangEng of Lang =
|
||||
GrammarEng,
|
||||
LexiconEng
|
||||
,ConstructionEng
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
resource MakeStructuralEng = open CatEng, ParadigmsEng, ResEng, MorphoEng, Prelude in {
|
||||
|
||||
oper
|
||||
mkSubj : Str -> Subj = \x ->
|
||||
oper
|
||||
mkSubj : Str -> Subj = \x ->
|
||||
lin Subj {s = x} ;
|
||||
mkNP : Str -> ParadigmsEng.Number -> NP = \s,n ->
|
||||
lin NP (regNP s n) ;
|
||||
@@ -11,7 +11,7 @@ oper
|
||||
lin IDet {s = s ; n = n} ;
|
||||
mkIQuant : Str -> Str -> IQuant = \s,n ->
|
||||
lin IQuant {s = table {Sg => s ; Pl => n}} ;
|
||||
|
||||
|
||||
mkDet = overload {
|
||||
mkDet : Str -> Det = \s ->
|
||||
lin Det (mkDeterminer singular s) ;
|
||||
|
||||
@@ -14,9 +14,9 @@ resource MorphoEng = open Prelude, (Predef=Predef), ResEng in {
|
||||
|
||||
--2 Determiners
|
||||
|
||||
oper
|
||||
oper
|
||||
|
||||
mkDeterminer : Number -> Str ->
|
||||
mkDeterminer : Number -> Str ->
|
||||
{s : Str ; sp : Gender => Bool => NPCase => Str; n : Number ; hasNum : Bool} = \n,s -> mkDeterminerSpec n s s s False ; --- was True!?
|
||||
|
||||
mkDeterminerSpec : Number -> Str -> Str -> Str -> Bool ->
|
||||
@@ -30,7 +30,7 @@ resource MorphoEng = open Prelude, (Predef=Predef), ResEng in {
|
||||
--2 Pronouns
|
||||
|
||||
|
||||
mkPron : (i,me,my,mine : Str) -> Number -> Person -> Gender ->
|
||||
mkPron : (i,me,my,mine : Str) -> Number -> Person -> Gender ->
|
||||
{s : NPCase => Str ; sp : Case => Str ; a : Agr} =
|
||||
\i,me,my,mine,n,p,g -> {
|
||||
s = table {
|
||||
|
||||
@@ -3,8 +3,8 @@ concrete NounEng of Noun = CatEng ** open MorphoEng, ResEng, Prelude in {
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
DetCN det cn = {
|
||||
s = \\c => det.s ++ cn.s ! det.n ! npcase2case c ;
|
||||
DetCN det cn = {
|
||||
s = \\c => det.s ++ cn.s ! det.n ! npcase2case c ;
|
||||
a = agrgP3 det.n cn.g
|
||||
} ;
|
||||
|
||||
@@ -48,8 +48,8 @@ concrete NounEng of Noun = CatEng ** open MorphoEng, ResEng, Prelude in {
|
||||
} ;
|
||||
|
||||
DetQuantOrd quant num ord = {
|
||||
s = quant.s ! num.hasCard ! num.n ++ num.s ! quant.isDef ! Nom ++ ord.s ! Nom;
|
||||
sp = \\g,_,c => quant.s ! num.hasCard ! num.n ++ num.s ! quant.isDef ! Nom ++ ord.s ! npcase2case c ;
|
||||
s = quant.s ! num.hasCard ! num.n ++ num.s ! quant.isDef ! Nom ++ ord.s ! Nom;
|
||||
sp = \\g,_,c => quant.s ! num.hasCard ! num.n ++ num.s ! quant.isDef ! Nom ++ ord.s ! npcase2case c ;
|
||||
n = num.n ;
|
||||
hasNum = True
|
||||
} ;
|
||||
@@ -84,9 +84,9 @@ concrete NounEng of Noun = CatEng ** open MorphoEng, ResEng, Prelude in {
|
||||
sp = \\_,c => adn.s ++ num.sp!False!c ;
|
||||
n = num.n} ;
|
||||
|
||||
OrdSuperl a = {s = \\c => a.s ! AAdj Superl c } ;
|
||||
OrdSuperl a = {s = \\c => getSuperl c a} ;
|
||||
|
||||
OrdNumeralSuperl n a = {s = \\c => n.s ! True ! NOrd ! Nom ++ a.s ! AAdj Superl c } ;
|
||||
OrdNumeralSuperl n a = {s = \\c => n.s ! True ! NOrd ! Nom ++ getSuperl c a} ;
|
||||
|
||||
DefArt = {
|
||||
s = \\hasCard,n => artDef ;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
concrete NumeralEng of Numeral = CatEng [Numeral,Digits] ** open Prelude, ResEng in {
|
||||
|
||||
lincat
|
||||
lincat
|
||||
Digit = {s : DForm => CardOrd => Case => Str} ;
|
||||
Sub10 = {s : DForm => CardOrd => Case => Str ; n : Number} ;
|
||||
Sub100 = {s : CardOrd => Case => Str ; n : Number} ;
|
||||
@@ -44,7 +44,7 @@ lin pot3plus n m = {
|
||||
|
||||
-- numerals as sequences of digits
|
||||
|
||||
lincat
|
||||
lincat
|
||||
Dig = TDigit ;
|
||||
|
||||
lin
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
--
|
||||
-- Aarne Ranta 2003--2005
|
||||
--
|
||||
-- This is an API for the user of the resource grammar
|
||||
-- This is an API for the user of the resource grammar
|
||||
-- for adding lexical items. It gives functions for forming
|
||||
-- expressions of open categories: nouns, adjectives, verbs.
|
||||
--
|
||||
--
|
||||
-- Closed categories (determiners, pronouns, conjunctions) are
|
||||
-- accessed through the resource syntax API, $Structural.gf$.
|
||||
-- accessed through the resource syntax API, $Structural.gf$.
|
||||
--
|
||||
-- The main difference with $MorphoEng.gf$ is that the types
|
||||
-- referred to are compiled resource grammar types. We have moreover
|
||||
@@ -21,22 +21,22 @@
|
||||
-- regular cases. Then we give a worst-case function $mkC$, which serves as an
|
||||
-- escape to construct the most irregular words of type $C$.
|
||||
-- However, this function should only seldom be needed: we have a
|
||||
-- separate module [``IrregEng`` ../../english/IrregEng.gf],
|
||||
-- separate module [``IrregEng`` ../../english/IrregEng.gf],
|
||||
-- which covers irregular verbss.
|
||||
|
||||
resource ParadigmsEng = open
|
||||
(Predef=Predef),
|
||||
Prelude,
|
||||
resource ParadigmsEng = open
|
||||
(Predef=Predef),
|
||||
Prelude,
|
||||
MorphoEng,
|
||||
ResEng,
|
||||
CatEng
|
||||
in {
|
||||
--2 Parameters
|
||||
--2 Parameters
|
||||
--
|
||||
-- To abstract over gender names, we define the following identifiers.
|
||||
|
||||
oper
|
||||
Gender : Type ;
|
||||
Gender : Type ;
|
||||
|
||||
human : Gender ;
|
||||
nonhuman : Gender ;
|
||||
@@ -45,9 +45,9 @@ oper
|
||||
|
||||
-- To abstract over number names, we define the following.
|
||||
|
||||
Number : Type ;
|
||||
Number : Type ;
|
||||
|
||||
singular : Number ;
|
||||
singular : Number ;
|
||||
plural : Number ;
|
||||
|
||||
-- To abstract over case names, we define the following.
|
||||
@@ -74,10 +74,10 @@ oper
|
||||
mkN : overload {
|
||||
|
||||
-- The regular function captures the variants for nouns ending with
|
||||
-- "s","sh","x","z" or "y": "kiss - kisses", "flash - flashes";
|
||||
-- "s","sh","x","z" or "y": "kiss - kisses", "flash - flashes";
|
||||
-- "fly - flies" (but "toy - toys"),
|
||||
|
||||
mkN : (flash : Str) -> N ; -- plural s, incl. flash-flashes, fly-flies
|
||||
mkN : (flash : Str) -> N ; -- plural s, incl. flash-flashes, fly-flies
|
||||
|
||||
-- In practice the worst case is to give singular and plural nominative.
|
||||
|
||||
@@ -91,7 +91,7 @@ oper
|
||||
|
||||
mkN : Gender -> N -> N ; -- default nonhuman
|
||||
|
||||
--3 Compound nouns
|
||||
--3 Compound nouns
|
||||
--
|
||||
-- A compound noun is an uninflected string attached to an inflected noun,
|
||||
-- such as "baby boom", "chief executive officer".
|
||||
@@ -106,17 +106,17 @@ oper
|
||||
verbalN : V -> N ; -- e.g. sing -> singing
|
||||
|
||||
|
||||
--3 Relational nouns
|
||||
--3 Relational nouns
|
||||
|
||||
mkN2 : overload {
|
||||
mkN2 : Str -> N2 ; -- reg. noun, prep. "of" --%
|
||||
mkN2 : Str -> N2 ; -- reg. noun, prep. "of" --%
|
||||
mkN2 : N -> N2 ; -- e.g. wife of (default prep. to)
|
||||
mkN2 : N -> Str -> N2 ; -- access to --%
|
||||
mkN2 : N -> Prep -> N2 ; -- e.g. access to
|
||||
mkN2 : Str -> Str -> N2 ; -- access to (regular noun) --%
|
||||
} ;
|
||||
|
||||
-- Use the function $mkPrep$ or see the section on prepositions below to
|
||||
-- Use the function $mkPrep$ or see the section on prepositions below to
|
||||
-- form other prepositions.
|
||||
--
|
||||
-- Three-place relational nouns ("the connection from x to y") need two prepositions.
|
||||
@@ -168,8 +168,8 @@ oper
|
||||
} ;
|
||||
|
||||
-- Regular comparison is formed by "more - most" for words with two vowels separated
|
||||
-- and terminated by some other letters. To force this or the opposite,
|
||||
-- the following can be used:
|
||||
-- and terminated by some other letters. To force this or the opposite,
|
||||
-- the following can be used:
|
||||
|
||||
compoundA : A -> A ; -- force comparison with more/most
|
||||
simpleA : A -> A ; -- force comparison with -er,-est
|
||||
@@ -179,7 +179,7 @@ oper
|
||||
--3 Two-place adjectives
|
||||
|
||||
mkA2 : overload {
|
||||
mkA2 : A -> Prep -> A2 ; -- absent from
|
||||
mkA2 : A -> Prep -> A2 ; -- absent from
|
||||
mkA2 : A -> Str -> A2 ; -- absent from --%
|
||||
mkA2 : Str -> Prep -> A2 ; -- absent from --%
|
||||
mkA2 : Str -> Str -> A2 -- absent from --%
|
||||
@@ -235,7 +235,7 @@ oper
|
||||
|
||||
-- The regular verb function recognizes the special cases where the last
|
||||
-- character is "y" ("cry-cries" but "buy-buys") or a sibilant
|
||||
-- ("kiss-"kisses", "jazz-jazzes", "rush-rushes", "munch - munches",
|
||||
-- ("kiss-"kisses", "jazz-jazzes", "rush-rushes", "munch - munches",
|
||||
-- "fix - fixes").
|
||||
|
||||
mkV : (cry : Str) -> V ; -- regular, incl. cry-cries, kiss-kisses etc
|
||||
@@ -247,13 +247,13 @@ oper
|
||||
mkV : (stop, stopped : Str) -> V ; -- reg. with consonant duplication
|
||||
|
||||
-- There is an extensive list of irregular verbs in the module $IrregularEng$.
|
||||
-- In practice, it is enough to give three forms,
|
||||
-- In practice, it is enough to give three forms,
|
||||
-- e.g. "drink - drank - drunk".
|
||||
|
||||
mkV : (drink, drank, drunk : Str) -> V ; -- ordinary irregular
|
||||
|
||||
-- Irregular verbs with duplicated consonant in the present participle.
|
||||
|
||||
|
||||
mkV : (run, ran, run, running : Str) -> V ; -- irregular with duplication --%
|
||||
|
||||
-- Except for "be", the worst case needs five forms: the infinitive and
|
||||
@@ -360,10 +360,10 @@ mkInterj : Str -> Interj
|
||||
-- The definitions should not bother the user of the API. So they are
|
||||
-- hidden from the document.
|
||||
|
||||
Gender = ResEng.Gender ;
|
||||
Gender = ResEng.Gender ;
|
||||
Number = ResEng.Number ;
|
||||
Case = ResEng.NPCase ;
|
||||
human = Masc ;
|
||||
human = Masc ;
|
||||
nonhuman = Neutr ;
|
||||
masculine = Masc ;
|
||||
feminine = Fem ;
|
||||
@@ -376,7 +376,7 @@ mkInterj : Str -> Interj
|
||||
|
||||
Preposition : Type = Str ; -- obsolete
|
||||
|
||||
regN = \ray ->
|
||||
regN = \ray ->
|
||||
let rays = add_s ray
|
||||
in
|
||||
mk2N ray rays ;
|
||||
@@ -392,12 +392,12 @@ mkInterj : Str -> Interj
|
||||
|
||||
duplFinal : Str -> Str = \w -> case w of {
|
||||
_ + ("a" | "e" | "o") + ("a" | "e" | "i" | "o" | "u") + ? => w ; -- waited, needed
|
||||
_ + ("a" | "e" | "i" | "o" | "u") +
|
||||
_ + ("a" | "e" | "i" | "o" | "u") +
|
||||
c@("b"|"d"|"g"|"m"|"n"|"p"|"r"|"t") => w + c ; -- omitted, manned
|
||||
_ => w
|
||||
} ;
|
||||
|
||||
mk2N = \man,men ->
|
||||
mk2N = \man,men ->
|
||||
let mens = case last men of {
|
||||
"s" => men + "'" ;
|
||||
_ => men + "'s"
|
||||
@@ -405,7 +405,7 @@ mkInterj : Str -> Interj
|
||||
in
|
||||
mk4N man men (man + "'s") mens ;
|
||||
|
||||
mk4N = \man,men,man's,men's ->
|
||||
mk4N = \man,men,man's,men's ->
|
||||
lin N (mkNoun man man's men men's ** {g = Neutr}) ;
|
||||
|
||||
genderN g man = lin N {s = man.s ; g = g} ;
|
||||
@@ -432,7 +432,7 @@ mkInterj : Str -> Interj
|
||||
mkN2 : N -> Str -> N2 = \n,s -> prepN2 n (mkPrep s);
|
||||
mkN2 : Str -> Str -> N2 = \n,s -> prepN2 (regN n) (mkPrep s);
|
||||
mkN2 : N -> N2 = \n -> prepN2 n (mkPrep "of") ;
|
||||
mkN2 : Str -> N2 = \s -> prepN2 (regN s) (mkPrep "of")
|
||||
mkN2 : Str -> N2 = \s -> prepN2 (regN s) (mkPrep "of")
|
||||
} ;
|
||||
|
||||
prepN2 = \n,p -> lin N2 (n ** {c2 = p.s}) ;
|
||||
@@ -461,11 +461,11 @@ mkInterj : Str -> Interj
|
||||
mkQuant : (no_sg, no_pl, none_sg, non_pl : Str) -> Quant = \sg,pl,sg',pl' -> mkQuantifier sg pl sg' pl' sg' pl';
|
||||
} ;
|
||||
|
||||
mkQuantifier : Str -> Str -> Str -> Str -> Str -> Str -> Quant =
|
||||
mkQuantifier : Str -> Str -> Str -> Str -> Str -> Str -> Quant =
|
||||
\sg,pl,sg1',pl1',sg2',pl2' -> lin Quant {
|
||||
s = \\_ => table { Sg => sg ; Pl => pl } ;
|
||||
sp = \\g,_ => table {
|
||||
Sg => \\c => regGenitiveS (case g of {Masc=>sg1'; Fem=>sg1'; Neutr=>sg2'}) ! npcase2case c ;
|
||||
Sg => \\c => regGenitiveS (case g of {Masc=>sg1'; Fem=>sg1'; Neutr=>sg2'}) ! npcase2case c ;
|
||||
Pl => \\c => regGenitiveS (case g of {Masc=>pl1'; Fem=>pl1'; Neutr=>pl2'}) ! npcase2case c} ;
|
||||
isDef = True
|
||||
} ;
|
||||
@@ -474,8 +474,8 @@ mkInterj : Str -> Interj
|
||||
|
||||
mk2A a b = mkAdjective a a a b ;
|
||||
regA a = case a of {
|
||||
_ + ("a" | "e" | "i" | "o" | "u" | "y") + ? + _ +
|
||||
("a" | "e" | "i" | "o" | "u" | "y") + ? + _ =>
|
||||
_ + ("a" | "e" | "i" | "o" | "u" | "y") + ? + _ +
|
||||
("a" | "e" | "i" | "o" | "u" | "y") + ? + _ =>
|
||||
lin A (compoundADeg (regADeg a)) ;
|
||||
_ => lin A (regADeg a)
|
||||
} ;
|
||||
@@ -486,7 +486,7 @@ mkInterj : Str -> Interj
|
||||
|
||||
mkADeg a b c d = mkAdjective a b c d ;
|
||||
|
||||
regADeg happy =
|
||||
regADeg happy =
|
||||
let
|
||||
happ = init happy ;
|
||||
y = last happy ;
|
||||
@@ -496,7 +496,7 @@ mkInterj : Str -> Interj
|
||||
_ => duplFinal happy + "e"
|
||||
} ;
|
||||
in mkADeg happy (happie + "r") (happie + "st") (adj2adv happy) ;
|
||||
|
||||
|
||||
adj2adv : Str -> Str = \happy ->
|
||||
case happy of {
|
||||
_ + "ble" => init happy + "y" ;
|
||||
@@ -505,13 +505,14 @@ mkInterj : Str -> Interj
|
||||
_ => happy + "ly"
|
||||
} ;
|
||||
|
||||
duplADeg fat =
|
||||
mkADeg fat
|
||||
duplADeg fat =
|
||||
mkADeg fat
|
||||
(fat + last fat + "er") (fat + last fat + "est") (adj2adv fat) ;
|
||||
|
||||
compoundADeg a =
|
||||
let ad = (a.s ! AAdj Posit Nom)
|
||||
in mkADeg ad ("more" ++ ad) ("most" ++ ad) (a.s ! AAdv) ;
|
||||
let ad : Str = a.s ! AAdj Posit Nom ;
|
||||
a' : Adjective = mkADeg ad nonExist nonExist (a.s ! AAdv) ;
|
||||
in a' ** {isMost = True} ;
|
||||
|
||||
adegA a = a ;
|
||||
|
||||
@@ -528,7 +529,7 @@ mkInterj : Str -> Interj
|
||||
|
||||
mk5V a b c d e = lin V (mkVerb a b c d e ** {s1 = []}) ;
|
||||
|
||||
regV cry =
|
||||
regV cry =
|
||||
let
|
||||
cries = (regN cry).s ! Pl ! Nom ; -- !
|
||||
cried : Str = case cries of {
|
||||
@@ -539,7 +540,7 @@ mkInterj : Str -> Interj
|
||||
crying : Str = case cry of {
|
||||
_ + "ee" => cry + "ing" ;
|
||||
d + "ie" => d + "ying" ;
|
||||
us + "e" => us + "ing" ;
|
||||
us + "e" => us + "ing" ;
|
||||
ent + "er" => ent + "ering" ;
|
||||
_ => duplFinal cry + "ing"
|
||||
}
|
||||
@@ -547,14 +548,14 @@ mkInterj : Str -> Interj
|
||||
|
||||
reg2V fit fitted =
|
||||
let fitt = Predef.tk 2 fitted ;
|
||||
in
|
||||
in
|
||||
if_then_else V (pbool2bool (Predef.eqStr (last fit) (last fitt)))
|
||||
(mk5V fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing"))
|
||||
(mk5V fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing"))
|
||||
(regV fit) ;
|
||||
|
||||
regDuplV fit =
|
||||
regDuplV fit =
|
||||
case last fit of {
|
||||
("a" | "e" | "i" | "o" | "u" | "y") =>
|
||||
("a" | "e" | "i" | "o" | "u" | "y") =>
|
||||
Predef.error (["final duplication makes no sense for"] ++ fit) ;
|
||||
t =>
|
||||
let fitt = fit + t in
|
||||
@@ -567,8 +568,8 @@ mkInterj : Str -> Interj
|
||||
irreg4V x y z w = let reg = (regV x).s in
|
||||
mk5V x (reg ! VPres) y z w ** {s1 = []} ;
|
||||
|
||||
irregDuplV fit y z =
|
||||
let
|
||||
irregDuplV fit y z =
|
||||
let
|
||||
fitting = (regDuplV fit).s ! VPresPart
|
||||
in
|
||||
mk5V fit (fit + "s") y z fitting ;
|
||||
@@ -585,7 +586,7 @@ mkInterj : Str -> Interj
|
||||
prepV2 v p = lin V2 {s = v.s ; p = v.p ; c2 = p.s ; isRefl = v.isRefl} ;
|
||||
dirV2 v = prepV2 v noPrep ;
|
||||
|
||||
prepPrepV3 v p q =
|
||||
prepPrepV3 v p q =
|
||||
lin V3 {s = v.s ; p = v.p ; c2 = p.s ; c3 = q.s ; isRefl = v.isRefl} ;
|
||||
dirV3 v p = prepPrepV3 v noPrep p ;
|
||||
dirdirV3 v = dirV3 v noPrep ;
|
||||
@@ -593,22 +594,22 @@ mkInterj : Str -> Interj
|
||||
mkVS v = lin VS v ;
|
||||
mkVV v = lin VV {
|
||||
s = table {VVF vf => v.s ! vf ; _ => v.s ! VInf} ;
|
||||
p = v.p ;
|
||||
p = v.p ;
|
||||
typ = VVInf
|
||||
} ;
|
||||
auxVV, infVV = \v -> lin VV {
|
||||
s = table {
|
||||
VVF vf => v.s ! vf ;
|
||||
VVPresNeg => v.s ! VPres ++ "not" ;
|
||||
VVF vf => v.s ! vf ;
|
||||
VVPresNeg => v.s ! VPres ++ "not" ;
|
||||
VVPastNeg => v.s ! VPast ++ "not" ; --# notpresent
|
||||
_ => v.s ! VInf
|
||||
} ;
|
||||
p = v.p ;
|
||||
p = v.p ;
|
||||
typ = VVAux
|
||||
} ;
|
||||
ingVV v = lin VV {
|
||||
s = table {VVF vf => v.s ! vf ; _ => v.s ! VInf} ;
|
||||
p = v.p ;
|
||||
p = v.p ;
|
||||
typ = VVPresPart
|
||||
} ;
|
||||
mkVQ v = lin VQ v ;
|
||||
@@ -657,7 +658,7 @@ mkInterj : Str -> Interj
|
||||
mkN : Str -> N -> N = compoundN
|
||||
} ;
|
||||
|
||||
-- Relational nouns ("daughter of x") need a preposition.
|
||||
-- Relational nouns ("daughter of x") need a preposition.
|
||||
|
||||
prepN2 : N -> Prep -> N2 ;
|
||||
|
||||
@@ -671,20 +672,23 @@ mkInterj : Str -> Interj
|
||||
|
||||
mkA = overload {
|
||||
mkA : Str -> A = regA ;
|
||||
mkA : (fat,fatter : Str) -> A = \fat,fatter ->
|
||||
mkA : (fat,fatter : Str) -> A = \fat,fatter ->
|
||||
mkAdjective fat fatter (init fatter + "st") (adj2adv fat) ;
|
||||
mkA : (good,better,best,well : Str) -> A = \a,b,c,d ->
|
||||
mkAdjective a b c d
|
||||
} ;
|
||||
|
||||
invarA s = mkAdjective s s s s ;
|
||||
invarA s = lin A {
|
||||
s = \\_ => s ;
|
||||
isPre = True ;
|
||||
isMost = False} ;
|
||||
|
||||
compoundA = compoundADeg ;
|
||||
simpleA a =
|
||||
let ad = (a.s ! AAdj Posit Nom)
|
||||
simpleA a =
|
||||
let ad = (a.s ! AAdj Posit Nom)
|
||||
in regADeg ad ;
|
||||
|
||||
irregAdv a adv = lin A {s = table {AAdv => adv; aform => a.s ! aform}; isPre = a.isPre} ;
|
||||
|
||||
irregAdv a adv = a ** {s = table {AAdv => adv; aform => a.s ! aform}} ;
|
||||
|
||||
prepA2 : A -> Prep -> A2 ;
|
||||
|
||||
@@ -726,7 +730,7 @@ mkInterj : Str -> Interj
|
||||
mkV2 : V -> Str -> V2 = \v,p -> prepV2 v (mkPrep p) ;
|
||||
mkV2 : Str -> Prep -> V2 = \v,p -> prepV2 (regV v) p ;
|
||||
mkV2 : Str -> Str -> V2 = \v,p -> prepV2 (regV v) (mkPrep p)
|
||||
};
|
||||
};
|
||||
|
||||
prepPrepV3 : V -> Prep -> Prep -> V3 ;
|
||||
dirV3 : V -> Prep -> V3 ;
|
||||
@@ -748,18 +752,18 @@ mkInterj : Str -> Interj
|
||||
mkConj : Str -> Str -> Number -> Conj = mk2Conj ;
|
||||
} ;
|
||||
|
||||
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
|
||||
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
|
||||
lin Conj (sd2 x y ** {n = n}) ;
|
||||
|
||||
---- obsolete
|
||||
|
||||
-- Comparison adjectives may two more forms.
|
||||
-- Comparison adjectives may two more forms.
|
||||
|
||||
ADeg : Type ;
|
||||
|
||||
mkADeg : (good,better,best,well : Str) -> ADeg ;
|
||||
|
||||
-- The regular pattern recognizes two common variations:
|
||||
-- The regular pattern recognizes two common variations:
|
||||
-- "-e" ("rude" - "ruder" - "rudest") and
|
||||
-- "-y" ("happy - happier - happiest - happily")
|
||||
|
||||
@@ -780,7 +784,7 @@ mkInterj : Str -> Interj
|
||||
adegA : ADeg -> A ;
|
||||
|
||||
|
||||
regPN : Str -> PN ;
|
||||
regPN : Str -> PN ;
|
||||
regGenPN : Str -> Gender -> PN ; -- John, John's
|
||||
|
||||
-- Sometimes you can reuse a common noun as a proper name, e.g. "Bank".
|
||||
|
||||
@@ -5,8 +5,8 @@ concrete QuestionEng of Question = CatEng ** open ResEng, Prelude in {
|
||||
lin
|
||||
|
||||
QuestCl cl = {
|
||||
s = \\t,a,p =>
|
||||
let cls = cl.s ! t ! a ! p
|
||||
s = \\t,a,p =>
|
||||
let cls = cl.s ! t ! a ! p
|
||||
in table {
|
||||
QDir => cls ! OQuest ;
|
||||
QIndir => "if" ++ cls ! oDir ----
|
||||
@@ -17,15 +17,15 @@ concrete QuestionEng of Question = CatEng ** open ResEng, Prelude in {
|
||||
let cl = mkClause (qp.s ! npNom) (agrP3 qp.n) vp
|
||||
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! oDir} ; ----
|
||||
|
||||
QuestSlash ip slash =
|
||||
{s = \\t,a,b,q =>
|
||||
QuestSlash ip slash =
|
||||
{s = \\t,a,b,q =>
|
||||
(mkQuestion (ss (ip.s ! NPAcc)) slash).s ! t ! a ! b ! q ++ slash.c2
|
||||
} ;
|
||||
--- changed AR 5/6/2016: uses stranding; pied-piping in ExtraEng
|
||||
|
||||
|
||||
QuestIAdv iadv cl = mkQuestion iadv cl ;
|
||||
|
||||
QuestIComp icomp np =
|
||||
QuestIComp icomp np =
|
||||
mkQuestion icomp (mkClause (np.s ! npNom) np.a (predAux auxBe)) ;
|
||||
|
||||
|
||||
@@ -35,19 +35,19 @@ concrete QuestionEng of Question = CatEng ** open ResEng, Prelude in {
|
||||
s = \\c => ip.s ! c ++ adv.s ;
|
||||
n = ip.n
|
||||
} ;
|
||||
|
||||
|
||||
IdetCN idet cn = {
|
||||
s = \\c => idet.s ++ cn.s ! idet.n ! npcase2case c ;
|
||||
s = \\c => idet.s ++ cn.s ! idet.n ! npcase2case c ;
|
||||
n = idet.n
|
||||
} ;
|
||||
|
||||
IdetIP idet = {
|
||||
s = \\c => idet.s ;
|
||||
s = \\c => idet.s ;
|
||||
n = idet.n
|
||||
} ;
|
||||
|
||||
IdetQuant idet num = {
|
||||
s = idet.s ! num.n ++ num.s ! False ! Nom ;
|
||||
s = idet.s ! num.n ++ num.s ! False ! Nom ;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
@@ -56,14 +56,14 @@ concrete QuestionEng of Question = CatEng ** open ResEng, Prelude in {
|
||||
CompIAdv a = a ;
|
||||
CompIP p = ss (p.s ! npNom) ;
|
||||
|
||||
lincat
|
||||
lincat
|
||||
QVP = ResEng.VP ;
|
||||
lin
|
||||
ComplSlashIP vp np = insertObjPre (\\_ => vp.c2 ++ np.s ! NPAcc) vp ;
|
||||
AdvQVP vp adv = insertObj (\\_ => adv.s) vp ;
|
||||
AddAdvQVP vp adv = insertObj (\\_ => adv.s) vp ;
|
||||
|
||||
QuestQVP qp vp =
|
||||
QuestQVP qp vp =
|
||||
let cl = mkClause (qp.s ! npNom) (agrP3 qp.n) vp
|
||||
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! oDir} ; ----
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@ concrete RelativeEng of Relative = CatEng ** open ResEng in {
|
||||
lin
|
||||
|
||||
RelCl cl = {
|
||||
s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! oDir ;
|
||||
s = \\t,a,p,_ => "such" ++ "that" ++ cl.s ! t ! a ! p ! oDir ;
|
||||
c = npNom
|
||||
} ;
|
||||
|
||||
RelVP rp vp = {
|
||||
s = \\t,ant,b,ag =>
|
||||
let
|
||||
s = \\t,ant,b,ag =>
|
||||
let
|
||||
agr = case rp.a of {
|
||||
RNoAg => ag ;
|
||||
RAg a => a
|
||||
@@ -23,11 +23,11 @@ concrete RelativeEng of Relative = CatEng ** open ResEng in {
|
||||
} ;
|
||||
|
||||
-- Pied piping: "that we are looking at". Pied piping and empty
|
||||
-- relative are defined in $ExtraEng.gf$ ("at which we are looking",
|
||||
-- relative are defined in $ExtraEng.gf$ ("at which we are looking",
|
||||
-- "we are looking at").
|
||||
|
||||
RelSlash rp slash = {
|
||||
s = \\t,a,p,ag =>
|
||||
s = \\t,a,p,ag =>
|
||||
rp.s ! RC (fromAgr ag).g NPAcc ++ slash.s ! t ! a ! p ! oDir ++ slash.c2 ;
|
||||
c = NPAcc
|
||||
} ;
|
||||
@@ -42,7 +42,7 @@ concrete RelativeEng of Relative = CatEng ** open ResEng in {
|
||||
|
||||
IdRP =
|
||||
{ s = table {
|
||||
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
|
||||
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
|
||||
RC Neutr _ => "that" ;
|
||||
RC _ NPAcc => "that" ;
|
||||
RC _ (NCase Nom) => "that" ;
|
||||
|
||||
@@ -39,7 +39,7 @@ resource ResEng = ParamX ** open Prelude in {
|
||||
param
|
||||
Agr = AgP1 Number | AgP2 Number | AgP3Sg Gender | AgP3Pl Gender ;
|
||||
|
||||
param
|
||||
param
|
||||
Gender = Neutr | Masc | Fem ;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ resource ResEng = ParamX ** open Prelude in {
|
||||
-- Only these five forms are needed for open-lexicon verbs.
|
||||
|
||||
param
|
||||
VForm =
|
||||
VForm =
|
||||
VInf
|
||||
| VPres
|
||||
| VPPart
|
||||
@@ -58,13 +58,13 @@ resource ResEng = ParamX ** open Prelude in {
|
||||
|
||||
-- Auxiliary verbs have special negative forms.
|
||||
|
||||
VVForm =
|
||||
VVForm =
|
||||
VVF VForm
|
||||
| VVPresNeg
|
||||
| VVPastNeg --# notpresent
|
||||
;
|
||||
|
||||
-- The order of sentence is needed already in $VP$ because the need of "do" depends on it.
|
||||
-- The order of sentence is needed already in $VP$ because the need of "do" depends on it.
|
||||
-- $ODir True$ means contracted forms ("'s", "'d", "'ve". "'re").
|
||||
-- Notice that inverted forms ($OQuest$) don't allow verb contractions: *"'s he arrived".
|
||||
|
||||
@@ -83,7 +83,7 @@ param
|
||||
AForm = AAdj Degree Case | AAdv ;
|
||||
|
||||
--2 For $Relative$
|
||||
|
||||
|
||||
RAgr = RNoAg | RAg Agr ;
|
||||
RCase = RPrep Gender | RC Gender NPCase ;
|
||||
|
||||
@@ -95,7 +95,7 @@ param
|
||||
--2 Transformations between parameter types
|
||||
|
||||
oper
|
||||
toAgr : Number -> Person -> Gender -> Agr = \n,p,g ->
|
||||
toAgr : Number -> Person -> Gender -> Agr = \n,p,g ->
|
||||
case p of {
|
||||
P1 => AgP1 n ;
|
||||
P2 => AgP2 n ;
|
||||
@@ -116,8 +116,8 @@ param
|
||||
|
||||
agrgP3 : Number -> Gender -> Agr = \n,g -> toAgr n P3 g ;
|
||||
|
||||
conjAgr : Agr -> Agr -> Agr = \a0,b0 ->
|
||||
let a = fromAgr a0 ; b = fromAgr b0
|
||||
conjAgr : Agr -> Agr -> Agr = \a0,b0 ->
|
||||
let a = fromAgr a0 ; b = fromAgr b0
|
||||
in
|
||||
toAgr
|
||||
(conjNumber a.n b.n)
|
||||
@@ -127,7 +127,7 @@ param
|
||||
|
||||
-- For each lexical category, here are the worst-case constructors.
|
||||
|
||||
mkNoun : (_,_,_,_ : Str) -> {s : Number => Case => Str} =
|
||||
mkNoun : (_,_,_,_ : Str) -> {s : Number => Case => Str} =
|
||||
\man,mans,men,mens -> {
|
||||
s = table {
|
||||
Sg => table {
|
||||
@@ -141,18 +141,40 @@ param
|
||||
}
|
||||
} ;
|
||||
|
||||
mkAdjective : (_,_,_,_ : Str) -> {s : AForm => Str; isPre : Bool; lock_A : {}} =
|
||||
\good,better,best,well -> lin A {
|
||||
s = table {
|
||||
AAdj Posit c => (regGenitiveS good) ! c ;
|
||||
AAdj Compar c => (regGenitiveS better) ! c ;
|
||||
AAdj Superl c => (regGenitiveS best) ! c ;
|
||||
AAdv => well
|
||||
} ;
|
||||
isPre = True
|
||||
Adjective : Type = {s : AForm => Str ; isPre, isMost : Bool} ;
|
||||
mkAdjective : (_,_,_,_ : Str) -> Adjective = \good,better,best,well ->
|
||||
let adjCompar : Adjective = {
|
||||
s = table {
|
||||
AAdj Posit c => (regGenitiveS good) ! c ;
|
||||
AAdj Compar c => (regGenitiveS better) ! c ;
|
||||
AAdj Superl c => (regGenitiveS best) ! c ;
|
||||
AAdv => well
|
||||
} ;
|
||||
isPre = True ;
|
||||
isMost = False ;
|
||||
} ;
|
||||
in case better of {
|
||||
"more" + _
|
||||
=> adjCompar ** {
|
||||
s = table {
|
||||
AAdj Posit c => adjCompar.s ! AAdj Posit c ;
|
||||
AAdv => adjCompar.s ! AAdv ;
|
||||
_ => nonExist } ; -- IL 06/2021. Replace with an actual string, if this causes problems.
|
||||
isMost = True } ;
|
||||
_ => adjCompar
|
||||
} ;
|
||||
|
||||
-- IL 06/2021: remove "more" and "most" from A & A2's inflection table
|
||||
getCompar : Case -> Adjective -> Str = \c,a -> case a.isMost of {
|
||||
True => "more" ++ a.s ! AAdj Posit c ;
|
||||
False => a.s ! AAdj Compar c
|
||||
} ;
|
||||
getSuperl : Case -> Adjective -> Str = \c,a -> case a.isMost of {
|
||||
True => "most" ++ a.s ! AAdj Posit c ;
|
||||
False => a.s ! AAdj Superl c
|
||||
} ;
|
||||
|
||||
mkVerb : (_,_,_,_,_ : Str) -> Verb =
|
||||
mkVerb : (_,_,_,_,_ : Str) -> Verb =
|
||||
\go,goes,went,gone,going -> {
|
||||
s = table {
|
||||
VInf => go ;
|
||||
@@ -167,12 +189,12 @@ param
|
||||
|
||||
mkIP : (i,me,my : Str) -> Number -> {s : NPCase => Str ; n : Number} =
|
||||
\i,me,my,n -> let who = mkNP i me my n P3 Neutr in {
|
||||
s = who.s ;
|
||||
s = who.s ;
|
||||
n = n
|
||||
} ;
|
||||
|
||||
mkNP : (i,me,my : Str) -> Number -> Person -> Gender ->
|
||||
{s : NPCase => Str ; a : Agr} = \i,me,my,n,p,g ->
|
||||
mkNP : (i,me,my : Str) -> Number -> Person -> Gender ->
|
||||
{s : NPCase => Str ; a : Agr} = \i,me,my,n,p,g ->
|
||||
{ s = table {
|
||||
NCase Nom => i ;
|
||||
NPAcc => me ;
|
||||
@@ -184,7 +206,7 @@ param
|
||||
regNP : Str -> Number -> {s : NPCase => Str ; a : Agr} = \that,n ->
|
||||
mkNP that that (that + "'s") n P3 Neutr ;
|
||||
|
||||
regGenitiveS : Str -> Case => Str = \s ->
|
||||
regGenitiveS : Str -> Case => Str = \s ->
|
||||
table { Gen => genitiveS s; _ => s } ;
|
||||
|
||||
genitiveS : Str -> Str = \dog ->
|
||||
@@ -199,7 +221,7 @@ param
|
||||
|
||||
artIndef = pre {
|
||||
"eu" | "Eu" | "uni" | "up" => "a" ;
|
||||
"un" => "an" ;
|
||||
"un" => "an" ;
|
||||
"a" | "e" | "i" | "o" | "A" | "E" | "I" | "O" => "an" ;
|
||||
"SMS" | "sms" => "an" ; ---
|
||||
_ => "a"
|
||||
@@ -216,7 +238,7 @@ param
|
||||
} ;
|
||||
|
||||
param
|
||||
CPolarity =
|
||||
CPolarity =
|
||||
CPos
|
||||
| CNeg Bool ; -- contracted or not
|
||||
|
||||
@@ -227,13 +249,13 @@ param
|
||||
} ;
|
||||
|
||||
VerbForms : Type =
|
||||
Tense => Anteriority => CPolarity => Order => Agr =>
|
||||
Tense => Anteriority => CPolarity => Order => Agr =>
|
||||
{aux, adv, fin, inf : Str} ; -- would, not, sleeps, slept
|
||||
|
||||
VP : Type = {
|
||||
s : VerbForms ;
|
||||
p : Str ; -- verb particle
|
||||
prp : Str ; -- present participle
|
||||
prp : Str ; -- present participle
|
||||
ptp : Str ; -- past participle
|
||||
inf : Str ; -- the infinitive form ; VerbForms would be the logical place
|
||||
ad : Agr => Str ; -- sentence adverb (can be Xself, hence Agr)
|
||||
@@ -248,13 +270,13 @@ param
|
||||
missingAdv : Bool -- The sentence has been through VPSlashPrep, and the only missing thing is just an adverbial and shouldn't affect the agreement.
|
||||
} ;
|
||||
|
||||
predVc : (Verb ** {c2 : Str}) -> SlashVP = \verb ->
|
||||
predVc : (Verb ** {c2 : Str}) -> SlashVP = \verb ->
|
||||
predV verb ** {c2 = verb.c2 ; gapInMiddle = True; missingAdv = False} ;
|
||||
|
||||
cBind : Str -> Str = \s -> Predef.BIND ++ ("'" + s) ;
|
||||
|
||||
predV : Verb -> VP = \verb -> {
|
||||
s = \\t,ant,b,ord,agr =>
|
||||
s = \\t,ant,b,ord,agr =>
|
||||
let
|
||||
inf = verb.s ! VInf ;
|
||||
fin = presVerb verb agr ;
|
||||
@@ -303,8 +325,8 @@ param
|
||||
} ;
|
||||
|
||||
predAux : Aux -> VP = \verb -> {
|
||||
s = \\t,ant,cb,ord,agr =>
|
||||
let
|
||||
s = \\t,ant,cb,ord,agr =>
|
||||
let
|
||||
b = case cb of {
|
||||
CPos => Pos ;
|
||||
_ => Neg
|
||||
@@ -321,7 +343,7 @@ param
|
||||
<Pres,Anter,CPos,_> => vf (have agr) part ; --# notpresent
|
||||
<Pres,Anter,CNeg c,ODir True> => vfn c (haveContr agr) (haventContr agr) part ; --# notpresent
|
||||
<Pres,Anter,CNeg c,_> => vfn c (have agr) (havent agr) part ; --# notpresent
|
||||
|
||||
|
||||
<Past,Anter,CPos,ODir True> => vf (cBind "d") part ; --# notpresent
|
||||
<Past,Anter,CPos,_> => vf "had" part ; --# notpresent
|
||||
<Past,Anter,CNeg c,ODir True> => vfn c (cBind "d") (cBind "d not") part ; --# notpresent
|
||||
@@ -349,7 +371,7 @@ param
|
||||
<Pres,Simul,CPos, _> => vf fin [] ;
|
||||
<Pres,Simul,CNeg c,ODir True> => vfn c cfinp fin [] ;
|
||||
<Pres,Simul,CNeg c, _> => vfn c finp fin []
|
||||
|
||||
|
||||
} ;
|
||||
p = [] ;
|
||||
prp = verb.prpart ;
|
||||
@@ -360,14 +382,14 @@ param
|
||||
isSimple = True ;
|
||||
s2 = \\_ => []
|
||||
} ;
|
||||
|
||||
vff : Str -> Str -> {aux, adv, fin, inf : Str} = \x,y ->
|
||||
|
||||
vff : Str -> Str -> {aux, adv, fin, inf : Str} = \x,y ->
|
||||
{aux = [] ; adv = [] ; fin = x ; inf = y} ;
|
||||
|
||||
vf : Str -> Str -> {aux, adv, fin, inf : Str} = \x,y -> vfn True x x y ;
|
||||
|
||||
vfn : Bool -> Str -> Str -> Str -> {aux, fin, adv, inf : Str} =
|
||||
\contr,x,y,z ->
|
||||
vfn : Bool -> Str -> Str -> Str -> {aux, fin, adv, inf : Str} =
|
||||
\contr,x,y,z ->
|
||||
case contr of {
|
||||
True => {aux = y ; adv = [] ; fin = [] ; inf = z} ;
|
||||
False => {aux = x ; adv = "not" ; fin = [] ; inf = z}
|
||||
@@ -393,9 +415,9 @@ param
|
||||
isSimple = False ;
|
||||
} ;
|
||||
|
||||
insertObjc : (Agr => Str) -> SlashVP -> SlashVP = \obj,vp ->
|
||||
insertObjc : (Agr => Str) -> SlashVP -> SlashVP = \obj,vp ->
|
||||
insertObj obj vp ** {c2 = vp.c2 ; gapInMiddle = vp.gapInMiddle ; missingAdv = vp.missingAdv } ;
|
||||
insertExtrac : Str -> SlashVP -> SlashVP = \obj,vp ->
|
||||
insertExtrac : Str -> SlashVP -> SlashVP = \obj,vp ->
|
||||
insertExtra obj vp ** {c2 = vp.c2 ; gapInMiddle = vp.gapInMiddle ; missingAdv = vp.missingAdv } ;
|
||||
|
||||
--- AR 7/3/2013 move the particle after the object
|
||||
@@ -408,7 +430,7 @@ param
|
||||
ad = vp.ad ;
|
||||
s2 = \\a => obj ! a ++ vp.s2 ! a ++ vp.p ; -- and put it here ; corresponds to insertObjPre
|
||||
isSimple = False ;
|
||||
ext = vp.ext
|
||||
ext = vp.ext
|
||||
} ;
|
||||
|
||||
--- The adverb should be before the finite verb.
|
||||
@@ -439,7 +461,7 @@ param
|
||||
ext = vp.ext ++ e --- there should be at most one, one might think; but: I would say that it will be raining if I saw clouds
|
||||
} ;
|
||||
|
||||
--
|
||||
--
|
||||
|
||||
predVV : {s : VVForm => Str ; p : Str ; typ : VVType} -> VP = \verb ->
|
||||
let verbs = verb.s
|
||||
@@ -462,14 +484,14 @@ param
|
||||
_ => predV {s = \\vf => verbs ! VVF vf ; p = verb.p ; isRefl = False}
|
||||
} ;
|
||||
|
||||
presVerb : {s : VForm => Str} -> Agr -> Str = \verb ->
|
||||
presVerb : {s : VForm => Str} -> Agr -> Str = \verb ->
|
||||
agrVerb (verb.s ! VPres) (verb.s ! VInf) ;
|
||||
|
||||
infVP : VVType -> VP -> Bool -> Anteriority -> CPolarity -> Agr -> Str = \typ,vp,ad_pos,ant,cb,a ->
|
||||
case cb of {CPos => ""; _ => "not"} ++
|
||||
case ant of {
|
||||
Simul => case typ of {
|
||||
VVAux => vp.ad ! a ++ vp.inf ;
|
||||
VVAux => vp.ad ! a ++ vp.inf ;
|
||||
VVInf => case ad_pos of { ---- this is the "split infinitive"
|
||||
True => vp.ad ! a ++ "to" ++ vp.inf ;
|
||||
False => "to" ++ vp.ad ! a ++ vp.inf
|
||||
@@ -487,7 +509,7 @@ param
|
||||
} ++ vp.p ++
|
||||
vp.s2 ! a ++ vp.ext ;
|
||||
|
||||
agrVerb : Str -> Str -> Agr -> Str = \has,have,agr ->
|
||||
agrVerb : Str -> Str -> Agr -> Str = \has,have,agr ->
|
||||
case agr of {
|
||||
AgP3Sg _ => has ;
|
||||
_ => have
|
||||
@@ -502,20 +524,20 @@ param
|
||||
haventContr = agrVerb (cBind "s not") (cBind "ve not") ;
|
||||
|
||||
Aux = {
|
||||
pres : Polarity => Agr => Str ;
|
||||
contr : Polarity => Agr => Str ; -- contracted forms
|
||||
pres : Polarity => Agr => Str ;
|
||||
contr : Polarity => Agr => Str ; -- contracted forms
|
||||
past : Polarity => Agr => Str ; --# notpresent
|
||||
inf,ppart,prpart : Str
|
||||
} ;
|
||||
|
||||
auxBe : Aux = {
|
||||
pres = \\b,a => case <b,a> of {
|
||||
<Pos,AgP1 Sg> => "am" ;
|
||||
<Pos,AgP1 Sg> => "am" ;
|
||||
<Neg,AgP1 Sg> => ["am not"] ; --- am not I
|
||||
_ => agrVerb (posneg b "is") (posneg b "are") a
|
||||
} ;
|
||||
contr = \\b,a => case <b,a> of {
|
||||
<Pos,AgP1 Sg> => cBind "m" ;
|
||||
<Pos,AgP1 Sg> => cBind "m" ;
|
||||
<Neg,AgP1 Sg> => cBind "m not" ; --- am not I
|
||||
_ => agrVerb (posneg b (cBind "s")) (posneg b (cBind "re")) a
|
||||
} ;
|
||||
@@ -545,7 +567,7 @@ param
|
||||
AgP2 Pl => "yourselves" ;
|
||||
AgP3Pl _ => "themselves"
|
||||
} ;
|
||||
|
||||
|
||||
possPron : Agr => Str = table {
|
||||
AgP1 Sg => "my" ;
|
||||
AgP2 Sg => "your" ;
|
||||
@@ -565,8 +587,8 @@ param
|
||||
|
||||
mkClause : Str -> Agr -> VP -> Clause =
|
||||
\subj,agr,vp -> {
|
||||
s = \\t,a,b,o =>
|
||||
let
|
||||
s = \\t,a,b,o =>
|
||||
let
|
||||
verb = vp.s ! t ! a ! b ! o ! agr ;
|
||||
compl = vp.s2 ! agr ++ vp.ext
|
||||
in
|
||||
@@ -583,41 +605,41 @@ param
|
||||
_ => neg.s ! t ! a ! CPos ! o
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
-- For $Numeral$.
|
||||
|
||||
mkNum : Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Case => Str} =
|
||||
mkNum : Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Case => Str} =
|
||||
\two, twelve, twenty, second ->
|
||||
{s = table {
|
||||
unit => table {NCard => regGenitiveS two ; NOrd => regGenitiveS second} ;
|
||||
teen => \\c => mkCard c twelve ;
|
||||
unit => table {NCard => regGenitiveS two ; NOrd => regGenitiveS second} ;
|
||||
teen => \\c => mkCard c twelve ;
|
||||
ten => \\c => mkCard c twenty
|
||||
}
|
||||
} ;
|
||||
|
||||
regNum : Str -> {s : DForm => CardOrd => Case => Str} =
|
||||
regNum : Str -> {s : DForm => CardOrd => Case => Str} =
|
||||
\six -> mkNum six (six + "teen") (six + "ty") (regOrd six) ;
|
||||
|
||||
regCardOrd : Str -> {s : CardOrd => Case => Str} = \ten ->
|
||||
{s = table {NCard => regGenitiveS ten ;
|
||||
{s = table {NCard => regGenitiveS ten ;
|
||||
NOrd => regGenitiveS (regOrd ten)} } ;
|
||||
|
||||
mkCard : CardOrd -> Str -> Case => Str = \o,ten ->
|
||||
(regCardOrd ten).s ! o ;
|
||||
mkCard : CardOrd -> Str -> Case => Str = \o,ten ->
|
||||
(regCardOrd ten).s ! o ;
|
||||
|
||||
regOrd : Str -> Str = \ten ->
|
||||
regOrd : Str -> Str = \ten ->
|
||||
case last ten of {
|
||||
"y" => init ten + "ieth" ;
|
||||
_ => ten + "th"
|
||||
} ;
|
||||
|
||||
mkQuestion :
|
||||
{s : Str} -> Clause ->
|
||||
mkQuestion :
|
||||
{s : Str} -> Clause ->
|
||||
{s : Tense => Anteriority => CPolarity => QForm => Str} = \wh,cl ->
|
||||
{
|
||||
s = \\t,a,p =>
|
||||
let
|
||||
s = \\t,a,p =>
|
||||
let
|
||||
cls = cl.s ! t ! a ! p ;
|
||||
why = wh.s
|
||||
in table {
|
||||
|
||||
@@ -9,8 +9,8 @@ concrete SentenceEng of Sentence = CatEng ** open Prelude, ResEng in {
|
||||
PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
|
||||
|
||||
ImpVP vp = {
|
||||
s = \\pol,n =>
|
||||
let
|
||||
s = \\pol,n =>
|
||||
let
|
||||
agr = AgP2 (numImp n) ;
|
||||
verb = infVP VVAux vp False Simul CPos agr ;
|
||||
dont = case pol of {
|
||||
@@ -26,7 +26,7 @@ concrete SentenceEng of Sentence = CatEng ** open Prelude, ResEng in {
|
||||
s = \\pol,impform => adv.s ++ imp.s ! pol ! impform
|
||||
} ;
|
||||
|
||||
SlashVP np vp =
|
||||
SlashVP np vp =
|
||||
mkClause (np.s ! npNom) np.a vp ** {c2 = vp.c2} ;
|
||||
|
||||
AdvSlash slash adv = {
|
||||
@@ -36,8 +36,8 @@ concrete SentenceEng of Sentence = CatEng ** open Prelude, ResEng in {
|
||||
|
||||
SlashPrep cl prep = cl ** {c2 = prep.s} ;
|
||||
|
||||
SlashVS np vs slash =
|
||||
mkClause (np.s ! npNom) np.a
|
||||
SlashVS np vs slash =
|
||||
mkClause (np.s ! npNom) np.a
|
||||
(insertObj (\\_ => conjThat ++ slash.s) (predV vs)) **
|
||||
{c2 = slash.c2} ;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
concrete StructuralEng of Structural = CatEng **
|
||||
concrete StructuralEng of Structural = CatEng **
|
||||
open MorphoEng, ResEng, ParadigmsEng, MakeStructuralEng, Prelude in {
|
||||
|
||||
flags optimize=all ;
|
||||
@@ -38,7 +38,7 @@ concrete StructuralEng of Structural = CatEng **
|
||||
typ = VVAux
|
||||
} |
|
||||
{
|
||||
s = table {
|
||||
s = table {
|
||||
VVF VInf => ["be able to"] ;
|
||||
VVF VPres => "can" ;
|
||||
VVF VPPart => ["been able to"] ;
|
||||
|
||||
@@ -12,7 +12,7 @@ lin
|
||||
a = agrgP3 Sg cn.g
|
||||
} ;
|
||||
CNSymbNP det cn xs = {
|
||||
s = \\c => det.s ++ cn.s ! det.n ! Nom ++ (addGenitiveS xs.s) ! npcase2case c ;
|
||||
s = \\c => det.s ++ cn.s ! det.n ! Nom ++ (addGenitiveS xs.s) ! npcase2case c ;
|
||||
a = agrgP3 det.n cn.g
|
||||
} ;
|
||||
CNNumNP cn i = {
|
||||
@@ -20,12 +20,12 @@ lin
|
||||
a = agrgP3 Sg cn.g
|
||||
} ;
|
||||
|
||||
SymbS sy = sy ;
|
||||
SymbS sy = sy ;
|
||||
|
||||
SymbNum sy = { s,sp = \\_ => addGenitiveS sy.s ; n = Pl ; hasCard = True } ;
|
||||
SymbOrd sy = { s = \\c => sy.s ++ (regGenitiveS "th")!c} ;
|
||||
|
||||
lincat
|
||||
lincat
|
||||
|
||||
Symb, [Symb] = SS ;
|
||||
|
||||
@@ -38,7 +38,7 @@ lin
|
||||
oper
|
||||
-- Note: this results in a space before 's, but there's
|
||||
-- not mauch we can do about that.
|
||||
addGenitiveS : Str -> Case => Str = \s ->
|
||||
addGenitiveS : Str -> Case => Str = \s ->
|
||||
table { Gen => s ++ BIND ++ "'s"; _ => s } ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete TerminologyEng of Terminology = CatEng ** open
|
||||
concrete TerminologyEng of Terminology = CatEng ** open
|
||||
ResEng,
|
||||
ParadigmsEng,
|
||||
(G = GrammarEng),
|
||||
@@ -60,7 +60,7 @@ lin
|
||||
active_Parameter = mkN "active" ;
|
||||
passive_Parameter = mkN "passive" ;
|
||||
middle_Parameter = mkN "middle" ;
|
||||
|
||||
|
||||
imperative_Parameter = mkN "imperative" ;
|
||||
indicative_Parameter = mkN "indicative" ;
|
||||
conjunctive_Parameter = mkN "conjunctive" ;
|
||||
|
||||
@@ -6,13 +6,13 @@ concrete VerbEng of Verb = CatEng ** open ResEng, Prelude in {
|
||||
UseV = predV ;
|
||||
|
||||
SlashV2a v = predVc v ** {c2 = v.c2 ; gapInMiddle = False} ;
|
||||
Slash2V3 v np =
|
||||
Slash2V3 v np =
|
||||
insertObjc (\\_ => v.c2 ++ np.s ! NPAcc) (predVc v ** {c2 = v.c3 ; gapInMiddle = False}) ;
|
||||
Slash3V3 v np =
|
||||
Slash3V3 v np =
|
||||
insertObjc (\\_ => v.c3 ++ np.s ! NPAcc) (predVc v) ; ----
|
||||
|
||||
ComplVV v vp = insertObj (\\a => infVP v.typ vp False Simul CPos a) (predVV v) ; ---- insertExtra?
|
||||
ComplVS v s = insertExtra (conjThat ++ s.s) (predV v) ;
|
||||
ComplVS v s = insertExtra (conjThat ++ s.s) (predV v) ;
|
||||
--- ComplVS v s = insertObj (variants {\\_ => conjThat ++ s.s; \\_ => s.s}) (predV v) ;
|
||||
ComplVQ v q = insertExtra (q.s ! QIndir) (predV v) ;
|
||||
ComplVA v ap = insertObj (ap.s) (predV v) ;
|
||||
@@ -62,7 +62,7 @@ concrete VerbEng of Verb = CatEng ** open ResEng, Prelude in {
|
||||
CompAP ap = ap ;
|
||||
CompNP np = {s = \\_ => np.s ! NPAcc} ;
|
||||
CompAdv a = {s = \\_ => a.s} ;
|
||||
CompCN cn = {s = \\a => case (fromAgr a).n of {
|
||||
CompCN cn = {s = \\a => case (fromAgr a).n of {
|
||||
Sg => artIndef ++ cn.s ! Sg ! Nom ;
|
||||
Pl => cn.s ! Pl ! Nom
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,4 @@
|
||||
--# -path=.:alltenses
|
||||
concrete MorphoDictEng of MorphoDictEngAbs =
|
||||
CatEng [N,A,V,Adv,Prep] **
|
||||
open
|
||||
@@ -5,3 +6,6 @@ concrete MorphoDictEng of MorphoDictEngAbs =
|
||||
in
|
||||
{
|
||||
|
||||
oper mkAMost : Str -> Str -> A = \ajar,ly -> mkA ajar ("more" ++ ajar) ("most" ++ ajar) ly ;
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
9
src/morphodict/utils/fixAMost.sh
Executable file
9
src/morphodict/utils/fixAMost.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
cp MorphoDictEng.gf{,.bak}
|
||||
sed -E 's/mkA "(.*)" "DUMMY" "DUMMY" "(.*)"/mkAMost "\1" "\2"/g' < MorphoDictEng.gf.bak > MorphoDictEng.gf
|
||||
|
||||
# If you need to recreate the morphodict, do this.
|
||||
# ResEng.gf line 162 and ParadigmsEng.gf line 514, fill the inflection table with the word DUMMY instead of nonExist.
|
||||
# Then recompile RGL and MorphoDictEng.
|
||||
# Then run MkMorphodict, and it will output a file with "DUMMY" in it.
|
||||
Reference in New Issue
Block a user