mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-17 07:02:51 -06:00
Added versions of mkV for regular and irregular verbs with consonant duplication to ParadigmsEng.
This commit is contained in:
@@ -210,16 +210,23 @@ oper
|
|||||||
--2 Verbs
|
--2 Verbs
|
||||||
--
|
--
|
||||||
|
|
||||||
|
-- Verbs are constructed by the function $mkV$, which takes a varying
|
||||||
|
-- number of arguments.
|
||||||
mkV : overload {
|
mkV : overload {
|
||||||
-- The regular verb function recognizes the special cases where the last
|
-- The regular verb function recognizes the special cases where the last
|
||||||
-- character is "y" ("cry - cries" but "buy - buys") or "s", "sh", "x", "z"
|
-- character is "y" ("cry - cries" but "buy - buys") or "s", "sh", "x", "z"
|
||||||
-- ("fix - fixes", etc).
|
-- ("fix - fixes", etc).
|
||||||
mkV : Str -> V ;
|
mkV : (cry : Str) -> V ;
|
||||||
|
-- Give the present and past forms for regular verbs where
|
||||||
|
-- the last letter is duplicated in some forms,
|
||||||
|
-- e.g. "rip - ripped - ripping".
|
||||||
|
mkV : (stop, stopped : Str) -> V ;
|
||||||
-- There is an extensive list of irregular verbs in the module $IrregularEng$.
|
-- 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".
|
-- e.g. "drink - drank - drunk".
|
||||||
mkV : (drink, drank, drunk : Str) -> V ;
|
mkV : (drink, drank, drunk : Str) -> V ;
|
||||||
|
-- Irregular verbs with duplicated consonant in the present participle.
|
||||||
|
mkV : (run, ran, run, running : Str) -> V ;
|
||||||
-- Except for "be", the worst case needs five forms: the infinitive and
|
-- Except for "be", the worst case needs five forms: the infinitive and
|
||||||
-- the third person singular present, the past indicative, and the
|
-- the third person singular present, the past indicative, and the
|
||||||
-- past and present participles.
|
-- past and present participles.
|
||||||
@@ -232,20 +239,6 @@ oper
|
|||||||
mkV : V -> V
|
mkV : V -> V
|
||||||
};
|
};
|
||||||
|
|
||||||
-- The following variant duplicates the last letter in the forms like
|
|
||||||
-- "rip - ripped - ripping".
|
|
||||||
|
|
||||||
regDuplV : Str -> V ;
|
|
||||||
|
|
||||||
-- There is an extensive list of irregular verbs in the module $IrregularEng$.
|
|
||||||
-- In practice, it is enough to give three forms,
|
|
||||||
-- e.g. "drink - drank - drunk", with a variant indicating consonant
|
|
||||||
-- duplication in the present participle.
|
|
||||||
|
|
||||||
irregV : (drink, drank, drunk : Str) -> V ;
|
|
||||||
irregDuplV : (get, got, gotten : Str) -> V ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--3 Two-place verbs
|
--3 Two-place verbs
|
||||||
--
|
--
|
||||||
@@ -424,6 +417,10 @@ oper
|
|||||||
}
|
}
|
||||||
in mk5V cry cries cried cried crying ;
|
in mk5V cry cries cried cried crying ;
|
||||||
|
|
||||||
|
reg2V fit fitted =
|
||||||
|
let fitt = Predef.tk 2 fitted ;
|
||||||
|
in mk5V fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing") ;
|
||||||
|
|
||||||
regDuplV fit =
|
regDuplV fit =
|
||||||
case last fit of {
|
case last fit of {
|
||||||
("a" | "e" | "i" | "o" | "u" | "y") =>
|
("a" | "e" | "i" | "o" | "u" | "y") =>
|
||||||
@@ -436,6 +433,9 @@ oper
|
|||||||
irregV x y z = let reg = (regV x).s in
|
irregV x y z = let reg = (regV x).s in
|
||||||
mk5V x (reg ! VPres) y z (reg ! VPresPart) ** {s1 = [] ; lock_V = <>} ;
|
mk5V x (reg ! VPres) y z (reg ! VPresPart) ** {s1 = [] ; lock_V = <>} ;
|
||||||
|
|
||||||
|
irreg4V x y z w = let reg = (regV x).s in
|
||||||
|
mk5V x (reg ! VPres) y z w ** {s1 = [] ; lock_V = <>} ;
|
||||||
|
|
||||||
irregDuplV fit y z =
|
irregDuplV fit y z =
|
||||||
let
|
let
|
||||||
fitting = (regDuplV fit).s ! VPresPart
|
fitting = (regDuplV fit).s ! VPresPart
|
||||||
@@ -504,13 +504,23 @@ oper
|
|||||||
|
|
||||||
|
|
||||||
mk5V : (go, goes, went, gone, going : Str) -> V ;
|
mk5V : (go, goes, went, gone, going : Str) -> V ;
|
||||||
regV : Str -> V ;
|
regV : (cry : Str) -> V ;
|
||||||
|
reg2V : (stop, stopped : Str) -> V;
|
||||||
|
irregV : (drink, drank, drunk : Str) -> V ;
|
||||||
|
irreg4V : (run, ran, run, running : Str) -> V ;
|
||||||
partV : V -> Str -> V ;
|
partV : V -> Str -> V ;
|
||||||
reflV : V -> V ;
|
reflV : V -> V ;
|
||||||
|
|
||||||
|
-- Use reg2V instead
|
||||||
|
regDuplV : Str -> V ;
|
||||||
|
-- Use irreg4V instead
|
||||||
|
irregDuplV : (get, got, gotten : Str) -> V ;
|
||||||
|
|
||||||
mkV = overload {
|
mkV = overload {
|
||||||
mkV : Str -> V = regV ;
|
mkV : (cry : Str) -> V = regV ;
|
||||||
|
mkV : (stop, stopped : Str) -> V = reg2V ;
|
||||||
mkV : (drink, drank, drunk : Str) -> V = irregV ;
|
mkV : (drink, drank, drunk : Str) -> V = irregV ;
|
||||||
|
mkV : (run, ran, run, running : Str) -> V = irreg4V ;
|
||||||
mkV : (go, goes, went, gone, going : Str) -> V = mk5V ;
|
mkV : (go, goes, went, gone, going : Str) -> V = mk5V ;
|
||||||
mkV : V -> Str -> V = partV ;
|
mkV : V -> Str -> V = partV ;
|
||||||
mkV : V -> V = reflV
|
mkV : V -> V = reflV
|
||||||
|
|||||||
Reference in New Issue
Block a user