More English morphology clean-up.

This commit is contained in:
bjorn
2008-10-30 14:37:54 +00:00
parent 9e26b4f852
commit bed2d9068e
4 changed files with 79 additions and 84 deletions

View File

@@ -8,7 +8,7 @@
-- syntax. To build a lexicon, it is better to use $ParadigmsEng$, which -- syntax. To build a lexicon, it is better to use $ParadigmsEng$, which
-- gives a higher-level access to this module. -- gives a higher-level access to this module.
resource MorphoEng = ResEng ** open Prelude, (Predef=Predef) in { resource MorphoEng = open Prelude, (Predef=Predef), ResEng in {
flags optimize=all ; flags optimize=all ;

View File

@@ -28,6 +28,7 @@ resource ParadigmsEng = open
(Predef=Predef), (Predef=Predef),
Prelude, Prelude,
MorphoEng, MorphoEng,
ResEng,
CatEng CatEng
in { in {
--2 Parameters --2 Parameters
@@ -177,6 +178,10 @@ oper
mkAdA : Str -> AdA ; mkAdA : Str -> AdA ;
-- Adverbs modifying numerals
mkAdN : Str -> AdN ;
--2 Prepositions --2 Prepositions
-- --
-- A preposition as used for rection in the lexicon, as well as to -- A preposition as used for rection in the lexicon, as well as to
@@ -287,9 +292,9 @@ oper
-- The definitions should not bother the user of the API. So they are -- The definitions should not bother the user of the API. So they are
-- hidden from the document. -- hidden from the document.
Gender = MorphoEng.Gender ; Gender = ResEng.Gender ;
Number = MorphoEng.Number ; Number = ResEng.Number ;
Case = MorphoEng.Case ; Case = ResEng.Case ;
human = Masc ; human = Masc ;
nonhuman = Neutr ; nonhuman = Neutr ;
masculine = Masc ; masculine = Masc ;
@@ -405,6 +410,7 @@ oper
mkAdv x = ss x ** {lock_Adv = <>} ; mkAdv x = ss x ** {lock_Adv = <>} ;
mkAdV x = ss x ** {lock_AdV = <>} ; mkAdV x = ss x ** {lock_AdV = <>} ;
mkAdA x = ss x ** {lock_AdA = <>} ; mkAdA x = ss x ** {lock_AdA = <>} ;
mkAdN x = ss x ** {lock_AdN = <>} ;
mkPrep p = ss p ** {lock_Prep = <>} ; mkPrep p = ss p ** {lock_Prep = <>} ;
noPrep = mkPrep [] ; noPrep = mkPrep [] ;

View File

@@ -158,18 +158,6 @@ resource ResEng = ParamX ** open Prelude in {
a = toAgr n p g ; a = toAgr n p g ;
}; };
-- These functions cover many cases; full coverage inflectional patterns are
-- in $MorphoEng$.
regN : Str -> {s : Number => Case => Str} = \car ->
mkNoun car (car + "'s") (car + "s") (car + "s'") ;
regA : Str -> {s : AForm => Str} = \warm ->
mkAdjective warm (warm + "er") (warm + "est") (warm + "ly") ;
regV : Str -> Verb = \walk ->
mkVerb walk (walk + "s") (walk + "ed") (walk + "ed") (walk + "ing") ;
regNP : Str -> Number -> {s : Case => Str ; a : Agr} = \that,n -> regNP : Str -> Number -> {s : Case => Str ; a : Agr} = \that,n ->
mkNP that that (that + "'s") n P3 Neutr ; mkNP that that (that + "'s") n P3 Neutr ;

View File

@@ -1,25 +1,26 @@
concrete StructuralEng of Structural = CatEng ** concrete StructuralEng of Structural = CatEng **
open MorphoEng, (P = ParadigmsEng), Prelude in { open MorphoEng, ResEng, ParadigmsEng, Prelude in {
flags optimize=all ; flags optimize=all ;
lin lin
above_Prep = P.mkPrep "above" ; above_Prep = mkPrep "above" ;
after_Prep = P.mkPrep "after" ; after_Prep = mkPrep "after" ;
all_Predet = ss "all" ; all_Predet = ss "all" ;
almost_AdA, almost_AdN = ss "almost" ; almost_AdA = mkAdA "almost" ;
almost_AdN = mkAdN "almost" ;
although_Subj = ss "although" ; although_Subj = ss "although" ;
always_AdV = ss "always" ; always_AdV = mkAdV "always" ;
and_Conj = sd2 [] "and" ** {n = Pl} ; and_Conj = sd2 [] "and" ** {n = plural} ;
---b and_Conj = ss "and" ** {n = Pl} ; ---b and_Conj = ss "and" ** {n = plural} ;
because_Subj = ss "because" ; because_Subj = ss "because" ;
before_Prep = P.mkPrep "before" ; before_Prep = mkPrep "before" ;
behind_Prep = P.mkPrep "behind" ; behind_Prep = mkPrep "behind" ;
between_Prep = P.mkPrep "between" ; between_Prep = mkPrep "between" ;
both7and_DConj = sd2 "both" "and" ** {n = Pl} ; both7and_DConj = sd2 "both" "and" ** {n = plural} ;
but_PConj = ss "but" ; but_PConj = ss "but" ;
by8agent_Prep = P.mkPrep "by" ; by8agent_Prep = mkPrep "by" ;
by8means_Prep = P.mkPrep "by" ; by8means_Prep = mkPrep "by" ;
can8know_VV, can_VV = { can8know_VV, can_VV = {
s = table { s = table {
VVF VInf => ["be able to"] ; VVF VInf => ["be able to"] ;
@@ -32,32 +33,32 @@ concrete StructuralEng of Structural = CatEng **
} ; } ;
isAux = True isAux = True
} ; } ;
during_Prep = P.mkPrep "during" ; during_Prep = mkPrep "during" ;
either7or_DConj = sd2 "either" "or" ** {n = Sg} ; either7or_DConj = sd2 "either" "or" ** {n = singular} ;
everybody_NP = regNP "everybody" Sg ; everybody_NP = regNP "everybody" singular ;
every_Det = mkDeterminer Sg "every" ; every_Det = mkDeterminer singular "every" ;
everything_NP = regNP "everything" Sg ; everything_NP = regNP "everything" singular ;
everywhere_Adv = ss "everywhere" ; everywhere_Adv = mkAdv "everywhere" ;
few_Det = mkDeterminer Pl "few" ; few_Det = mkDeterminer plural "few" ;
--- first_Ord = ss "first" ; DEPRECATED --- first_Ord = ss "first" ; DEPRECATED
for_Prep = P.mkPrep "for" ; for_Prep = mkPrep "for" ;
from_Prep = P.mkPrep "from" ; from_Prep = mkPrep "from" ;
he_Pron = mkPron "he" "him" "his" "his" Sg P3 Masc ; he_Pron = mkPron "he" "him" "his" "his" singular P3 masculine ;
here_Adv = ss "here" ; here_Adv = mkAdv "here" ;
here7to_Adv = ss ["to here"] ; here7to_Adv = mkAdv ["to here"] ;
here7from_Adv = ss ["from here"] ; here7from_Adv = mkAdv ["from here"] ;
how_IAdv = ss "how" ; how_IAdv = ss "how" ;
how8many_IDet = mkDeterminer Pl ["how many"] ; how8many_IDet = mkDeterminer plural ["how many"] ;
if_Subj = ss "if" ; if_Subj = ss "if" ;
in8front_Prep = P.mkPrep ["in front of"] ; in8front_Prep = mkPrep ["in front of"] ;
i_Pron = mkPron "I" "me" "my" "mine" Sg P1 Masc ; i_Pron = mkPron "I" "me" "my" "mine" singular P1 human ;
in_Prep = P.mkPrep "in" ; in_Prep = mkPrep "in" ;
it_Pron = mkPron "it" "it" "its" "its" Sg P3 Neutr ; it_Pron = mkPron "it" "it" "its" "its" singular P3 nonhuman ;
less_CAdv = ss "less" ; less_CAdv = ss "less" ;
many_Det = mkDeterminer Pl "many" ; many_Det = mkDeterminer plural "many" ;
more_CAdv = ss "more" ; more_CAdv = ss "more" ;
most_Predet = ss "most" ; most_Predet = ss "most" ;
much_Det = mkDeterminer Sg "much" ; much_Det = mkDeterminer singular "much" ;
must_VV = { must_VV = {
s = table { s = table {
VVF VInf => ["have to"] ; VVF VInf => ["have to"] ;
@@ -72,54 +73,54 @@ concrete StructuralEng of Structural = CatEng **
} ; } ;
---b no_Phr = ss "no" ; ---b no_Phr = ss "no" ;
no_Utt = ss "no" ; no_Utt = ss "no" ;
on_Prep = P.mkPrep "on" ; on_Prep = mkPrep "on" ;
---- one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED ---- one_Quant = mkDeterminer singular "one" ; -- DEPRECATED
only_Predet = ss "only" ; only_Predet = ss "only" ;
or_Conj = sd2 [] "or" ** {n = Sg} ; or_Conj = sd2 [] "or" ** {n = singular} ;
otherwise_PConj = ss "otherwise" ; otherwise_PConj = ss "otherwise" ;
part_Prep = P.mkPrep "of" ; part_Prep = mkPrep "of" ;
please_Voc = ss "please" ; please_Voc = ss "please" ;
possess_Prep = P.mkPrep "of" ; possess_Prep = mkPrep "of" ;
quite_Adv = ss "quite" ; quite_Adv = mkAdv "quite" ;
she_Pron = mkPron "she" "her" "her" "hers" Sg P3 Fem ; she_Pron = mkPron "she" "her" "her" "hers" singular P3 feminine ;
so_AdA = ss "so" ; so_AdA = mkAdA "so" ;
somebody_NP = regNP "somebody" Sg ; somebody_NP = regNP "somebody" singular ;
someSg_Det = mkDeterminer Sg "some" ; someSg_Det = mkDeterminer singular "some" ;
somePl_Det = mkDeterminer Pl "some" ; somePl_Det = mkDeterminer plural "some" ;
something_NP = regNP "something" Sg ; something_NP = regNP "something" singular ;
somewhere_Adv = ss "somewhere" ; somewhere_Adv = mkAdv "somewhere" ;
that_Quant = mkQuant "that" "those" ; that_Quant = mkQuant "that" "those" ;
there_Adv = ss "there" ; there_Adv = mkAdv "there" ;
there7to_Adv = ss "there" ; there7to_Adv = mkAdv "there" ;
there7from_Adv = ss ["from there"] ; there7from_Adv = mkAdv ["from there"] ;
therefore_PConj = ss "therefore" ; therefore_PConj = ss "therefore" ;
they_Pron = mkPron "they" "them" "their" "theirs" Pl P3 Masc ; ---- they_Pron = mkPron "they" "them" "their" "theirs" plural P3 human ;
this_Quant = mkQuant "this" "these" ; this_Quant = mkQuant "this" "these" ;
through_Prep = P.mkPrep "through" ; through_Prep = mkPrep "through" ;
too_AdA = ss "too" ; too_AdA = mkAdA "too" ;
to_Prep = P.mkPrep "to" ; to_Prep = mkPrep "to" ;
under_Prep = P.mkPrep "under" ; under_Prep = mkPrep "under" ;
very_AdA = ss "very" ; very_AdA = mkAdA "very" ;
want_VV = P.mkVV (P.regV "want") ; want_VV = mkVV (regV "want") ;
we_Pron = mkPron "we" "us" "our" "ours" Pl P1 Masc ; we_Pron = mkPron "we" "us" "our" "ours" plural P1 human ;
whatPl_IP = mkIP "what" "what" "what's" Pl ; whatPl_IP = mkIP "what" "what" "what's" plural ;
whatSg_IP = mkIP "what" "what" "what's" Sg ; whatSg_IP = mkIP "what" "what" "what's" singular ;
when_IAdv = ss "when" ; when_IAdv = ss "when" ;
when_Subj = ss "when" ; when_Subj = ss "when" ;
where_IAdv = ss "where" ; where_IAdv = ss "where" ;
which_IQuant = {s = \\_ => "which"} ; which_IQuant = {s = \\_ => "which"} ;
---b whichPl_IDet = mkDeterminer Pl ["which"] ; ---b whichPl_IDet = mkDeterminer plural ["which"] ;
---b whichSg_IDet = mkDeterminer Sg ["which"] ; ---b whichSg_IDet = mkDeterminer singular ["which"] ;
whoPl_IP = mkIP "who" "whom" "whose" Pl ; whoPl_IP = mkIP "who" "whom" "whose" plural ;
whoSg_IP = mkIP "who" "whom" "whose" Sg ; whoSg_IP = mkIP "who" "whom" "whose" singular ;
why_IAdv = ss "why" ; why_IAdv = ss "why" ;
without_Prep = P.mkPrep "without" ; without_Prep = mkPrep "without" ;
with_Prep = P.mkPrep "with" ; with_Prep = mkPrep "with" ;
---b yes_Phr = ss "yes" ; ---b yes_Phr = ss "yes" ;
yes_Utt = ss "yes" ; yes_Utt = ss "yes" ;
youSg_Pron = mkPron "you" "you" "your" "yours" Sg P2 Masc ; youSg_Pron = mkPron "you" "you" "your" "yours" singular P2 human ;
youPl_Pron = mkPron "you" "you" "your" "yours" Pl P2 Masc ; youPl_Pron = mkPron "you" "you" "your" "yours" plural P2 human ;
youPol_Pron = mkPron "you" "you" "your" "yours" Sg P2 Masc ; youPol_Pron = mkPron "you" "you" "your" "yours" singular P2 human ;
} }