From 7e7895250522db6066320d951c57c52de84c76c8 Mon Sep 17 00:00:00 2001 From: Graham Nelson Date: Sun, 24 May 2020 16:15:15 +0100 Subject: [PATCH] Completed inflections --- README.md | 2 +- build.txt | 4 +- docs/core-module/1-wtc.html | 2 +- docs/core-module/3-pd.html | 2 +- docs/core-module/4-am.html | 4 +- docs/core-module/5-un.html | 2 +- docs/core-module/6-nv.html | 12 +- docs/if-module/3-tnt.html | 2 +- docs/inflections-module/1-im.html | 47 +- .../{3-ai.html => 2-ai.html} | 6 +- .../{3-ga.html => 2-ga.html} | 22 +- .../{3-plr.html => 2-plr.html} | 23 +- .../{3-pp.html => 2-pp.html} | 14 +- docs/inflections-module/2-tai.html | 97 +- docs/inflections-module/3-dcl.html | 440 +- .../{2-ld.html => 3-lc.html} | 46 +- docs/inflections-module/3-nc.html | 30 +- docs/inflections-module/3-vc.html | 553 +-- docs/inflections-module/4-dl.html | 91 + docs/inflections-module/4-ei.html | 3554 ++++++++--------- docs/inflections-module/P-htitm.html | 5 +- docs/inflections-module/P-wtmd.html | 234 +- docs/inflections-module/index.html | 65 +- docs/inflections-test/1-ut.html | 24 +- docs/kinds-module/2-dk.html | 2 +- docs/linguistics-module/4-prp.html | 2 +- docs/linguistics-module/4-vu.html | 2 +- docs/linguistics-test/1-ut.html | 2 +- docs/supervisor-module/5-ls.html | 2 +- docs/words-module/2-wa.html | 2 +- .../Chapter 5/Language Services.w | 2 +- inform7/Figures/memory-diagnostics.txt | 30 +- inform7/Figures/timings-diagnostics.txt | 58 +- .../core-module/Chapter 1/What To Compile.w | 2 +- .../core-module/Chapter 3/Plural Dictionary.w | 2 +- .../Chapter 4/Adjective Meanings.w | 4 +- .../core-module/Chapter 5/Using Nametags.w | 2 +- inform7/core-module/Chapter 6/New Verbs.w | 12 +- .../if-module/Chapter 3/The Naming Thicket.w | 2 +- .../kinds-module/Chapter 2/Describing Kinds.w | 2 +- .../Chapter 1/Inflections Module.w | 33 +- .../Article Inflection.w | 2 +- .../Grading Adjectives.w | 18 +- .../Past Participles.w | 4 +- .../{Chapter 3 => Chapter 2}/Pluralisation.w | 11 +- .../Chapter 2/Tries and Inflections.w | 79 +- .../Chapter 3/Declensions.w | 390 +- .../Linguistic Constants.w} | 30 +- .../Chapter 3/Name Clusters.w | 18 +- .../Chapter 3/Verb Conjugation.w | 267 +- .../Chapter 4/Default Language.w | 17 + .../Chapter 4/English Inflections.w | 3554 ++++++++--------- services/inflections-module/Contents.w | 17 +- .../How To Include This Module.w | 2 + .../Preliminaries/What This Module Does.w | 189 +- .../inflections-test/Chapter 1/Unit Tests.w | 20 +- .../Chapter 4/Prepositions.w | 2 +- .../Chapter 4/Verb Usages.w | 2 +- .../linguistics-test/Chapter 1/Unit Tests.w | 2 +- .../words-module/Chapter 2/Word Assemblages.w | 2 +- 60 files changed, 5329 insertions(+), 4739 deletions(-) rename docs/inflections-module/{3-ai.html => 2-ai.html} (86%) rename docs/inflections-module/{3-ga.html => 2-ga.html} (83%) rename docs/inflections-module/{3-plr.html => 2-plr.html} (89%) rename docs/inflections-module/{3-pp.html => 2-pp.html} (87%) rename docs/inflections-module/{2-ld.html => 3-lc.html} (74%) create mode 100644 docs/inflections-module/4-dl.html rename services/inflections-module/{Chapter 3 => Chapter 2}/Article Inflection.w (94%) rename services/inflections-module/{Chapter 3 => Chapter 2}/Grading Adjectives.w (86%) rename services/inflections-module/{Chapter 3 => Chapter 2}/Past Participles.w (93%) rename services/inflections-module/{Chapter 3 => Chapter 2}/Pluralisation.w (93%) rename services/inflections-module/{Chapter 2/Linguistic Definitions.w => Chapter 3/Linguistic Constants.w} (68%) create mode 100644 services/inflections-module/Chapter 4/Default Language.w diff --git a/README.md b/README.md index a5af5098b..ecc5e43fe 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Inform 7 -v10.1.0-alpha.1+6Q53 'Krypton' (23 May 2020) +v10.1.0-alpha.1+6Q54 'Krypton' (24 May 2020) ## About Inform 7 diff --git a/build.txt b/build.txt index 65acd418a..c1948e88f 100644 --- a/build.txt +++ b/build.txt @@ -1,3 +1,3 @@ Prerelease: alpha.1 -Build Date: 23 May 2020 -Build Number: 6Q53 +Build Date: 24 May 2020 +Build Number: 6Q54 diff --git a/docs/core-module/1-wtc.html b/docs/core-module/1-wtc.html index 3c94661c6..d402faeba 100644 --- a/docs/core-module/1-wtc.html +++ b/docs/core-module/1-wtc.html @@ -132,7 +132,7 @@ thing which is being compiled when it is. inform7_task->stage_of_compilation = -1; inform7_task->next_resource_number = 3; - InflectionDefns::set_default_nl(Projects::get_language_of_syntax(project)); + DefaultLanguage::set(Projects::get_language_of_syntax(project)); int rv = Sequence::carry_out(TargetVMs::debug_enabled(inform7_task->task->for_vm)); inform7_task = NULL; diff --git a/docs/core-module/3-pd.html b/docs/core-module/3-pd.html index 2b0d2d0c7..55d8be2bf 100644 --- a/docs/core-module/3-pd.html +++ b/docs/core-module/3-pd.html @@ -103,7 +103,7 @@ trouble to search the existing dictionary here. wording P = Node::get_text(V->next->next); Forbid plural declarations containing quoted text2.1; if (Assertions::Creator::vet_name_for_noun(P) == FALSE) return TRUE; - Pluralisation::register(S, P, InflectionDefns::default_nl(NULL)); + Pluralisation::register(S, P, DefaultLanguage::get(NULL)); return TRUE; } break; diff --git a/docs/core-module/4-am.html b/docs/core-module/4-am.html index c371955d4..11b7edce5 100644 --- a/docs/core-module/4-am.html +++ b/docs/core-module/4-am.html @@ -1527,7 +1527,7 @@ prefaced "(of a rulebook)", "(of an activity)", and so on.
 <adaptive-adjective> internal {
-    if (Projects::get_language_of_play(Task::project()) == InflectionDefns::default_nl(NULL)) return FALSE;
+    if (Projects::get_language_of_play(Task::project()) == DefaultLanguage::get(NULL)) return FALSE;
     adjectival_phrase *aph;
     LOOP_OVER(aph, adjectival_phrase) {
         wording AW = Clusters::get_name_general(aph->adjective_names, Projects::get_language_of_play(Task::project()), 1, -1);
@@ -1544,7 +1544,7 @@ prefaced "(of a rulebook)", "(of an activity)", and so on.
 
 
 void Adjectives::Meanings::agreements(void) {
-    if (Projects::get_language_of_play(Task::project()) == InflectionDefns::default_nl(NULL)) return;
+    if (Projects::get_language_of_play(Task::project()) == DefaultLanguage::get(NULL)) return;
     adjectival_phrase *aph;
     LOOP_OVER(aph, adjectival_phrase) {
         wording PW = Clusters::get_name_general(aph->adjective_names, Projects::get_language_of_play(Task::project()), 1, -1);
diff --git a/docs/core-module/5-un.html b/docs/core-module/5-un.html
index c834001b4..8d78782f8 100644
--- a/docs/core-module/5-un.html
+++ b/docs/core-module/5-un.html
@@ -185,7 +185,7 @@ and is a somewhat provisional feature for now.
     inform_language *nl = Node::get_defn_language(pn->next->next);
     int g = Annotations::read_int(pn->next->next, gender_reference_ANNOT);
     if (nl == NULL) internal_error("No such NL");
-    if (nl == InflectionDefns::default_nl(NULL)) {
+    if (nl == DefaultLanguage::get(NULL)) {
         StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_CantTranslateIntoEnglish),
             "you can't translate into English",
             "only out of it.");
diff --git a/docs/core-module/6-nv.html b/docs/core-module/6-nv.html
index 678c564df..20fc15251 100644
--- a/docs/core-module/6-nv.html
+++ b/docs/core-module/6-nv.html
@@ -165,7 +165,7 @@ as the object.
 
 <verb-implies-sentence-subject> ::=
     in <natural-language> <infinitive-declaration> |    ==> R[2]; <<inform_language:nl>> = (inform_language *) (RP[1]);
-    <infinitive-declaration>							==> R[1]; <<inform_language:nl>> = InflectionDefns::default_nl(NULL);
+    <infinitive-declaration>							==> R[1]; <<inform_language:nl>> = DefaultLanguage::get(NULL);
 
 <infinitive-declaration> ::=
     to <infinitive-usage> ( ... ) |    ==> R[1]; <<giving-parts>> = TRUE
@@ -715,7 +715,7 @@ foreign verbs (4).
     binary_predicate *bp = VerbMeanings::get_relational_meaning(&vm);
     if (bp == a_has_b_predicate) p = 1;
     if (bp == R_equality) p = 2;
-    if ((nl) && (nl != InflectionDefns::default_nl(NULL))) p = 5;
+    if ((nl) && (nl != DefaultLanguage::get(NULL))) p = 5;
     ++new_verb_sequence_count;
     vi = Verbs::new_verb(vc, FALSE);
     vc->vc_conjugates = vi;
@@ -801,13 +801,13 @@ foreign verbs (4).
     NewVerbs::declare_sm(Sentences::VPs::omit_from_SMF,						I"omit-from", 4);
 
     word_assemblage infinitive = PreformUtilities::wording(<bootstrap-verb>, 0);
-    verb_conjugation *vc = Conjugation::conjugate(infinitive, InflectionDefns::default_nl(NULL));
+    verb_conjugation *vc = Conjugation::conjugate(infinitive, DefaultLanguage::get(NULL));
     verb_identity *vi = Verbs::new_verb(vc, TRUE);
     vc->vc_conjugates = vi;
     VerbUsages::register_all_usages_of_verb(vi, FALSE, 2);
 
     infinitive = PreformUtilities::wording(<bootstrap-verb>, 1);
-    vc = Conjugation::conjugate(infinitive, InflectionDefns::default_nl(NULL));
+    vc = Conjugation::conjugate(infinitive, DefaultLanguage::get(NULL));
     vi = Verbs::new_verb(vc, FALSE);
     vc->vc_conjugates = vi;
     VerbUsages::register_all_usages_of_verb(vi, FALSE, 3);
@@ -1113,11 +1113,11 @@ foreign verbs (4).
             word_assemblage *wa = &(vc->tabulations[ACTIVE_MOOD].vc_text[tense][sense][part-1]);
             if (WordAssemblages::nonempty(*wa)) {
                 if (some_exist) {
-                    if (WordAssemblages::compare(wa, common) == FALSE)
+                    if (WordAssemblages::eq(wa, common) == FALSE)
                         some_differ = TRUE;
                     if (part != 3) {
                         if (common_except_3PS == NULL) common_except_3PS = wa;
-                        else if (WordAssemblages::compare(wa, common_except_3PS) == FALSE)
+                        else if (WordAssemblages::eq(wa, common_except_3PS) == FALSE)
                             some_except_3PS_differ = TRUE;
                     }
                 } else {
diff --git a/docs/if-module/3-tnt.html b/docs/if-module/3-tnt.html
index 788f53457..517f2c82d 100644
--- a/docs/if-module/3-tnt.html
+++ b/docs/if-module/3-tnt.html
@@ -266,7 +266,7 @@ from sentences, and this can include I6 properties with no I7 analogue.
                 this_is_named_for_something_with_a_printed_name = TRUE;
         Issue problem message if the name contains a comma11.1.1;
         if (this_has_a_printed_name == FALSE) Assert the printed name property11.1.2;
-        if (Projects::get_language_of_play(Task::project()) != InflectionDefns::default_nl(NULL))
+        if (Projects::get_language_of_play(Task::project()) != DefaultLanguage::get(NULL))
             Assert male, female, neuter adjectives from grammatical gender11.1.4;
     }
 
diff --git a/docs/inflections-module/1-im.html b/docs/inflections-module/1-im.html index 4c792dfec..6c0a746fa 100644 --- a/docs/inflections-module/1-im.html +++ b/docs/inflections-module/1-im.html @@ -82,52 +82,21 @@ which use this module:

§3. Like all modules, this one must define a start and end function:

+
enum CONSTRUCTED_PAST_PARTICIPLES_DA
+enum CONSTRUCTED_PLURALS_DA
+
 void InflectionsModule::start(void) {
-    Register this module's stream writers3.1;
-    Register this module's debugging log aspects3.3;
-    Register this module's debugging log writers3.4;
-    Register this module's command line switches3.5;
+    Log::declare_aspect(CONSTRUCTED_PAST_PARTICIPLES_DA,
+        L"constructed past participles", FALSE, FALSE);
+    Log::declare_aspect(CONSTRUCTED_PLURALS_DA,
+        L"constructed plurals", FALSE, FALSE);
 }
 void InflectionsModule::end(void) {
 }
 
-

§3.1. Register this module's stream writers3.1 = -

- -
-    ;
-
-
  • This code is used in §3.
-

§3.2.

- -
enum CONSTRUCTED_PAST_PARTICIPLES_DA
-enum CONSTRUCTED_PLURALS_DA
-
-

§3.3. Register this module's debugging log aspects3.3 = -

- -
-    Log::declare_aspect(CONSTRUCTED_PAST_PARTICIPLES_DA, L"constructed past participles", FALSE, FALSE);
-    Log::declare_aspect(CONSTRUCTED_PLURALS_DA, L"constructed plurals", FALSE, FALSE);
-
-
  • This code is used in §3.
-

§3.4. Register this module's debugging log writers3.4 = -

- -
-    ;
-
-
  • This code is used in §3.
-

§3.5. Register this module's command line switches3.5 = -

- -
-    ;
-
-
  • This code is used in §3.
diff --git a/docs/inflections-module/3-ai.html b/docs/inflections-module/2-ai.html similarity index 86% rename from docs/inflections-module/3-ai.html rename to docs/inflections-module/2-ai.html index 3ba23f471..33dfedb39 100644 --- a/docs/inflections-module/3-ai.html +++ b/docs/inflections-module/2-ai.html @@ -55,7 +55,7 @@
+

To inflect "a" into "an", and so forth.

§1. Here we take text such as "UNESCO document" and put an article in front, to @@ -72,14 +72,14 @@ trickier than they look). indef_trie = PreformUtilities::define_trie( <singular-noun-to-its-indefinite-article>, TRIE_START, - InflectionDefns::default_nl(NULL)); + DefaultLanguage::get(NULL)); wchar_t *result = Tries::search_avinue(indef_trie, initial_text); if (result == NULL) result = L"a"; WRITE("%w %S", result, initial_text); }

diff --git a/docs/inflections-module/3-ga.html b/docs/inflections-module/2-ga.html similarity index 83% rename from docs/inflections-module/3-ga.html rename to docs/inflections-module/2-ga.html index cf8ef371c..656d090db 100644 --- a/docs/inflections-module/3-ga.html +++ b/docs/inflections-module/2-ga.html @@ -56,7 +56,7 @@
+

To inflect adjectives into comparative and superlative forms.

§1. In English, the comparative of an adjective can generally be formed by @@ -80,11 +80,11 @@ The following does the suffixing: WRITE_TO(comprised, "some-long-text"); else WRITE_TO(comprised, "%N", Wordings::first_wn(W)); - nl = InflectionDefns::default_nl(nl); + nl = DefaultLanguage::get(nl); match_avinue *comp_trie = PreformUtilities::define_trie(<adjective-to-comparative>, TRIE_END, - InflectionDefns::default_nl(nl)); - Inflections::suffix_inflection(transformed, comp_trie, comprised); + DefaultLanguage::get(nl)); + Inflect::suffix(transformed, comp_trie, comprised); wording PW = Feeds::feed_text(transformed); word_assemblage merged = PreformUtilities::merge(<comparative-construction>, 0, @@ -107,11 +107,11 @@ The following does the suffixing: WRITE_TO(comprised, "some-long-text"); else WRITE_TO(comprised, "%N", Wordings::first_wn(W)); - nl = InflectionDefns::default_nl(nl); + nl = DefaultLanguage::get(nl); match_avinue *comp_trie = PreformUtilities::define_trie(<adjective-to-superlative>, TRIE_END, - InflectionDefns::default_nl(nl)); - Inflections::suffix_inflection(transformed, comp_trie, comprised); + DefaultLanguage::get(nl)); + Inflect::suffix(transformed, comp_trie, comprised); wording PW = Feeds::feed_text(transformed); LOGIF(CONSTRUCTED_PLURALS, "[Superlative of %W is %W]\n", W, PW); DISCARD_TEXT(transformed); @@ -133,11 +133,11 @@ comparison: for instance, "tallness" for "tall", or "steeliness" for "steely". WRITE_TO(comprised, "some-long-text"); else WRITE_TO(comprised, "%N", Wordings::first_wn(W)); - nl = InflectionDefns::default_nl(nl); + nl = DefaultLanguage::get(nl); match_avinue *comp_trie = PreformUtilities::define_trie(<adjective-to-quiddity>, TRIE_END, - InflectionDefns::default_nl(nl)); - Inflections::suffix_inflection(transformed, comp_trie, comprised); + DefaultLanguage::get(nl)); + Inflect::suffix(transformed, comp_trie, comprised); wording PW = Feeds::feed_text(transformed); LOGIF(CONSTRUCTED_PLURALS, "[Quiddity of %W is %W]\n", W, PW); DISCARD_TEXT(transformed); @@ -146,7 +146,7 @@ comparison: for instance, "tallness" for "tall", or "steeliness" for "steely". }

diff --git a/docs/inflections-module/3-plr.html b/docs/inflections-module/2-plr.html similarity index 89% rename from docs/inflections-module/3-plr.html rename to docs/inflections-module/2-plr.html index c3e889614..7729a26a6 100644 --- a/docs/inflections-module/3-plr.html +++ b/docs/inflections-module/2-plr.html @@ -63,10 +63,10 @@ function togglePopup(material_id) {
+

To form plurals of nouns.

-
+

§1. Dictionary. A modest dictionary of plurals is maintained to allow the user to record better plurals than the ones we would make ourselves. This assumes that a @@ -110,7 +110,7 @@ one not found in the dictionary).

 plural_dictionary_entry *Pluralisation::make(wording W, wording *PW,
     plural_dictionary_entry *search_from, NATURAL_LANGUAGE_WORDS_TYPE *nl) {
-    nl = InflectionDefns::default_nl(nl);
+    nl = DefaultLanguage::get(nl);
 
     plural_dictionary_entry *pde;
 
@@ -126,7 +126,7 @@ one not found in the dictionary).
                 return pde;
             }
 
-    Make a new plural by lexical writing back3.1;
+    Make a new plural by lexical writing back3.1;
 
     return NULL;
 }
@@ -155,29 +155,30 @@ it can be rebuilt quickly whenever needed again.
     TEMPORARY_TEXT(pluralised);
     WRITE_TO(original, "%+W", Wordings::one_word(last_wn));
     if (*(Lexer::word_text(last_wn)) == '\"') WRITE_TO(pluralised, "some-long-text");
-    else Pluralisation::regular(pluralised, original, nl);
+    else Pluralisation::regular(pluralised, original, nl);
     Feeds::feed_text(pluralised);
     *PW = Feeds::end(id);
     DISCARD_TEXT(original);
     DISCARD_TEXT(pluralised);
     LOGIF(CONSTRUCTED_PLURALS, "[Constructing plural of %W as %W]\n", W, *PW);
 
- +

§4. The pluralizing trie. The following takes a single word, assumes it to be a noun which meaningfully has a plural, and modifies it to the plural form.

-int Pluralisation::regular(OUTPUT_STREAM, text_stream *from, NATURAL_LANGUAGE_WORDS_TYPE *nl) {
-    nl = InflectionDefns::default_nl(nl);
+int Pluralisation::regular(OUTPUT_STREAM, text_stream *from,
+    NATURAL_LANGUAGE_WORDS_TYPE *nl) {
+    nl = DefaultLanguage::get(nl);
     match_avinue *plural_trie =
         PreformUtilities::define_trie(<singular-noun-to-its-plural>, TRIE_END,
-            InflectionDefns::default_nl(nl));
-    return Inflections::suffix_inflection(OUT, plural_trie, from);
+            DefaultLanguage::get(nl));
+    return Inflect::suffix(OUT, plural_trie, from);
 }
 
diff --git a/docs/inflections-module/3-pp.html b/docs/inflections-module/2-pp.html similarity index 87% rename from docs/inflections-module/3-pp.html rename to docs/inflections-module/2-pp.html index b0290f4af..19c89ff3c 100644 --- a/docs/inflections-module/3-pp.html +++ b/docs/inflections-module/2-pp.html @@ -63,10 +63,10 @@ function togglePopup(material_id) {
+

To inflect present into past participles.

-
+

§1. Constructing past participles. For example, "turning away" to "turned away".

@@ -80,7 +80,7 @@ function togglePopup(material_id) { WRITE_TO(from, "%W", Wordings::one_word(i)); if (Str::get_first_char(from) == '\"') WRITE_TO(pasturised, "some-long-text"); else { - if (PastParticiples::pasturise_text(pasturised, from)) { + if (PastParticiples::pasturise_text(pasturised, from)) { if (i > Wordings::first_wn(W)) Feeds::feed_wording(Wordings::up_to(W, i-1)); Feeds::feed_text(pasturised); if (i < Wordings::last_wn(W)) Feeds::feed_wording(Wordings::from(W, i+1)); @@ -102,15 +102,15 @@ above. It expects only a single word.

-int PastParticiples::pasturise_text(OUTPUT_STREAM, text_stream *from) {
+int PastParticiples::pasturise_text(OUTPUT_STREAM, text_stream *from) {
     match_avinue *past_trie =
         PreformUtilities::define_trie(<pasturise-participle>, TRIE_START,
-            InflectionDefns::default_nl(NULL));
-    return Inflections::suffix_inflection(OUT, past_trie, from);
+            DefaultLanguage::get(NULL));
+    return Inflect::suffix(OUT, past_trie, from);
 }
 
diff --git a/docs/inflections-module/2-tai.html b/docs/inflections-module/2-tai.html index af156d4a7..34c892fe3 100644 --- a/docs/inflections-module/2-tai.html +++ b/docs/inflections-module/2-tai.html @@ -63,60 +63,85 @@ function togglePopup(material_id) {
+

Using tries to inflect word endings.

-
+

§1. Suffix inflections. The following inflects the ending of the supplied text. It does so by -running the text through an avinue (a sequence of tries), whose result -is an instruction on how to modify that text: for example, the result -"3ize" tells us to strike out the last 3 characters and add "ize". -The special character + means "duplicate the last character" and -is useful for inflections which double consonants, such as "big" to -"bigger", which can be done with the instruction "0+er". -

- -

If there's no initial digit, the result replaces the original entirely; -if the result is null, i.e., if the avinue finds nothing, the result is -the same as the original. +running the text through an avinue: see Tries and Avinues (in foundation), +which is where the asterisk notation is handled.

-int Inflections::suffix_inflection(OUTPUT_STREAM, match_avinue *T, text_stream *from) {
+int Inflect::suffix(OUTPUT_STREAM, match_avinue *T, text_stream *from) {
     wchar_t *result = Tries::search_avinue(T, from);
-    return Inflections::follow_suffix_instruction(OUT, from, result);
+    return Inflect::follow_suffix_instruction(OUT, from, result);
 }
+
+

§2. The foundation code returns a result which may be null, if no match +was found. In that event, we leave the text unchanged, just as if the result +had been 0 — meaning "change nothing". +

-int Inflections::follow_suffix_instruction(OUTPUT_STREAM, text_stream *from, wchar_t *instruction) { +
+int Inflect::follow_suffix_instruction(OUTPUT_STREAM, text_stream *from,
+    wchar_t *instruction) {
     int success = TRUE;
     if (instruction == NULL) { success = FALSE; instruction = L"0"; }
-    int back = instruction[0] - '0';
     TEMPORARY_TEXT(outcome);
-    if ((back < 0) || (back > 9)) {
-        WRITE_TO(outcome, "%w", instruction);
-    } else {
-        for (int i = 0, len = Str::len(from); i<len-back; i++) PUT_TO(outcome, Str::get_at(from, i));
-        int j = 1;
-        if (instruction[j] == '+') { int last = Str::get_last_char(outcome); PUT_TO(outcome, last); j++; }
-        for (; instruction[j]; j++) PUT_TO(outcome, instruction[j]);
-    }
-
-    LOOP_THROUGH_TEXT(pos, outcome)
-        if (Str::get(pos) == '+') PUT(' ');
-        else PUT(Str::get(pos));
+    Modify the original according to the instruction2.1;
+    Write the output, interpreting plus signs as word breaks2.2;
     DISCARD_TEXT(outcome);
     return success;
 }
 
-

§2. General tries. Here we take a word assemblage and apply suffix inflection to the first word -alone, preserving the rest. However, if the result of this inflection contains -any + signs, those become word boundaries. This allows for inflections which -do more than simply fiddle with the final letters. +

§2.1. In general the result either has an initial digit, in which case it removes +that many terminal letters, or does not, in which case it removes all the +letters (and thus the result text replaces the original entirely). +The special character + after a digit means "duplicate the last character"; +in other contexts it means "break words here". +

+ +

For example, the result 3ize tells us to strike out the last 3 characters and +add "ize". +

+ +

Modify the original according to the instruction2.1 =

-word_assemblage Inflections::apply_trie_to_wa(word_assemblage wa, match_avinue *T) {
+    int back = instruction[0] - '0';
+    if ((back < 0) || (back > 9)) {
+        WRITE_TO(outcome, "%w", instruction);
+    } else {
+        for (int i = 0, len = Str::len(from); i<len-back; i++)
+            PUT_TO(outcome, Str::get_at(from, i));
+        int j = 1;
+        if (instruction[j] == '+') {
+            int last = Str::get_last_char(outcome); PUT_TO(outcome, last); j++;
+        }
+        for (; instruction[j]; j++) PUT_TO(outcome, instruction[j]);
+    }
+
+ +

§2.2. Write the output, interpreting plus signs as word breaks2.2 = +

+ +
+    LOOP_THROUGH_TEXT(pos, outcome)
+        if (Str::get(pos) == '+') PUT(' ');
+        else PUT(Str::get(pos));
+
+ +

§3. General tries. Here we take a word assemblage and apply suffix inflection to the first word +alone, preserving the rest: for example, "make the tea" might become "making +the tea". However, if the result of this inflection contains any + signs, +those once again become word boundaries. +

+ +
+word_assemblage Inflect::first_word(word_assemblage wa, match_avinue *T) {
     vocabulary_entry **words;
     int no_words;
     WordAssemblages::as_array(&wa, &words, &no_words);
@@ -125,7 +150,7 @@ do more than simply fiddle with the final letters.
     TEMPORARY_TEXT(unsuffixed);
     TEMPORARY_TEXT(suffixed);
     WRITE_TO(unsuffixed, "%V", words[0]);
-    int s = Inflections::suffix_inflection(suffixed, T, unsuffixed);
+    int s = Inflect::suffix(suffixed, T, unsuffixed);
     if (s == FALSE) {
         LOOP_THROUGH_TEXT(pos, unsuffixed)
             if (Str::get(pos) == '+') PUT_TO(suffixed, ' ');
@@ -139,7 +164,7 @@ do more than simply fiddle with the final letters.
 }
 
diff --git a/docs/inflections-module/3-dcl.html b/docs/inflections-module/3-dcl.html index 5338568ca..286296dbc 100644 --- a/docs/inflections-module/3-dcl.html +++ b/docs/inflections-module/3-dcl.html @@ -20,6 +20,20 @@ function togglePopup(material_id) { + + + @@ -63,12 +77,22 @@ function togglePopup(material_id) {
+

Declensions are sets of inflected variations of a common stem according to grammatical case.

-
+

§1. The traditional term "declension" refers to the set of inflected forms of a +word which does not serve as a verb: nouns, adjectives and pronouns all have +"declensions". These forms generally vary according to gender, number and +also "case", which expresses context. +

-

§1. Declension.

+

The inflections module uses the term "declension" in a more limited sense: +it is just the set of variations by case. Variations by gender and number are +taken care of by what are less elegantly called Name Clusters. +

+ +

At any rate, a declension object is a set of wordings, one for each case: +

 typedef struct declension {
@@ -77,183 +101,11 @@ function togglePopup(material_id) {
 } declension;
 
-

§2.

- -
-declension Declensions::decline(wording W, NATURAL_LANGUAGE_WORDS_TYPE *nl, int gen, int num) {
-    nl = InflectionDefns::default_nl(nl);
-    declension D = Declensions::decline_inner(W, nl, gen, num, <noun-declension>);
-    Fix the origin2.1;
-    return D;
-}
-
-declension Declensions::decline_article(wording W, NATURAL_LANGUAGE_WORDS_TYPE *nl, int gen, int num) {
-    nl = InflectionDefns::default_nl(nl);
-    declension D = Declensions::decline_inner(W, nl, gen, num, <article-declension>);
-    Fix the origin2.1;
-    return D;
-}
-
-

§2.1. Fix the origin2.1 = +

§2. Cases in a language are itemised in the special nonterminal <grammatical-case-names>:

-    int nc = Declensions::no_cases(nl);
-    for (int c = 0; c < nc; c++)
-        LOOP_THROUGH_WORDING(i, D.name_cased[c])
-            Lexer::set_word_location(i,
-                Lexer::word_location(
-                    Wordings::first_wn(W)));
-
- -

§3.

- -
-declension Declensions::decline_inner(wording W, NATURAL_LANGUAGE_WORDS_TYPE *nl, int gen, int num, nonterminal *nt) {
-    nl = InflectionDefns::default_nl(nl);
-    declension D;
-    D.within_language = nl;
-    for (production_list *pl = nt->first_pl; pl; pl = pl->next_pl) {
-        if ((pl->definition_language == NULL) || (pl->definition_language == nl)) {
-            for (production *pr = pl->first_pr; pr; pr = pr->next_pr) {
-                if ((pr->first_pt == NULL) ||
-                    (pr->first_pt->ptoken_category != FIXED_WORD_PTC) ||
-                    (pr->first_pt->next_pt == NULL) ||
-                    (pr->first_pt->next_pt->ptoken_category != NONTERMINAL_PTC))
-                    internal_error("line in <noun-declension> malformed");
-                wchar_t *gender_letter = Vocabulary::get_exemplar(pr->first_pt->ve_pt, FALSE);
-                if ((gender_letter[0] == '*') ||
-                    ((gender_letter[0] == 'm') && (gen == MASCULINE_GENDER)) ||
-                    ((gender_letter[0] == 'f') && (gen == FEMININE_GENDER)) ||
-                    ((gender_letter[0] == 'n') && (gen == NEUTER_GENDER))) {
-                    int found = FALSE;
-                    nonterminal *gnt = pr->first_pt->next_pt->nt_pt;
-                    if (pr->first_pt->next_pt->next_pt == NULL) {
-                        D = Declensions::decline_from_irregulars(W, nl, gnt, num, &found);
-                    } else {
-                        if ((pr->first_pt->next_pt->next_pt->ptoken_category != NONTERMINAL_PTC) ||
-                            (pr->first_pt->next_pt->next_pt->next_pt != NULL))
-                            internal_error("this line must end with two nonterminals");
-                        nonterminal *tnt = pr->first_pt->next_pt->next_pt->nt_pt;
-                        D = Declensions::decline_from_groups(W, nl, gnt, tnt, num, &found);
-                    }
-                    if (found) return D;
-                }
-
-            }
-        }
-    }
-    internal_error("no declension table terminated");
-    return D;
-}
-
-declension Declensions::decline_from_irregulars(wording W, NATURAL_LANGUAGE_WORDS_TYPE *nl,
-    nonterminal *gnt, int num, int *found) {
-    *found = FALSE;
-    declension D;
-    D.within_language = nl;
-    if (Wordings::length(W) == 1)
-        for (production_list *pl = gnt->first_pl; pl; pl = pl->next_pl)
-            if ((pl->definition_language == NULL) || (pl->definition_language == nl))
-                for (production *pr = pl->first_pr; pr; pr = pr->next_pr) {
-                    vocabulary_entry *stem = pr->first_pt->ve_pt;
-                    if (stem == Lexer::word(Wordings::first_wn(W))) {
-                        *found = TRUE;
-                        int c = 0, nc = Declensions::no_cases(nl);
-                        for (ptoken *pt = pr->first_pt->next_pt; pt; pt = pt->next_pt) {
-                            if (pt->ptoken_category != FIXED_WORD_PTC)
-                                internal_error("nonterminals are not allowed in irregular declensions");
-                            if (((num == 1) && (c < nc)) || ((num == 2) && (c >= nc))) {
-                                TEMPORARY_TEXT(stem);
-                                TEMPORARY_TEXT(result);
-                                WRITE_TO(stem, "%W", W);
-                                Inflections::follow_suffix_instruction(result, stem,
-                                    Vocabulary::get_exemplar(pt->ve_pt, TRUE));
-                                D.name_cased[c%nc] = Feeds::feed_text(result);
-                                DISCARD_TEXT(stem);
-                                DISCARD_TEXT(result);
-                            }
-                            c++;
-                        }
-                        if (c < 2*nc) internal_error("too few cases in irregular declension");
-                        if (c > 2*nc) internal_error("too many cases in irregular declension");
-                        return D;
-                    }
-                }
-    return D;
-}
-
-declension Declensions::decline_from_groups(wording W, NATURAL_LANGUAGE_WORDS_TYPE *nl,
-    nonterminal *gnt, nonterminal *nt, int num, int *found) {
-    declension D;
-    D.within_language = nl;
-    TEMPORARY_TEXT(from);
-    WRITE_TO(from, "%+W", W);
-    match_avinue *group_trie = PreformUtilities::define_trie(gnt, TRIE_END, InflectionDefns::default_nl(nl));
-    wchar_t *result = Tries::search_avinue(group_trie, from);
-    DISCARD_TEXT(from);
-    if (result == NULL) {
-        *found = FALSE;
-    } else {
-        *found = TRUE;
-        int group = result[0] - '0';
-        if ((group <= 0) || (group > 9))
-            internal_error("noun declension nonterminal result not a group number");
-        for (production_list *pl = nt->first_pl; pl; pl = pl->next_pl) {
-            if ((pl->definition_language == NULL) || (pl->definition_language == nl)) {
-                for (production *pr = pl->first_pr; pr; pr = pr->next_pr) {
-                    if ((pr->first_pt == NULL) ||
-                        (pr->first_pt->ptoken_category != NONTERMINAL_PTC) ||
-                        (pr->first_pt->next_pt != NULL))
-                        internal_error("noun declension nonterminal malformed");
-                    if (--group == 0)
-                        return Declensions::decline_from(W, nl, pr->first_pt->nt_pt, num);
-                }
-            }
-        }
-        internal_error("noun declension nonterminal has too few groups");
-    }
-    return D;
-}
-
-declension Declensions::decline_from(wording W, NATURAL_LANGUAGE_WORDS_TYPE *nl, nonterminal *nt, int num) {
-    int c = 0, nc = Declensions::no_cases(nl);
-    declension D;
-    D.within_language = nl;
-    for (production_list *pl = nt->first_pl; pl; pl = pl->next_pl) {
-        if ((pl->definition_language == NULL) || (pl->definition_language == nl)) {
-            for (production *pr = pl->first_pr; pr; pr = pr->next_pr) {
-                if ((pr->first_pt == NULL) ||
-                    (pr->first_pt->ptoken_category != FIXED_WORD_PTC) ||
-                    (pr->first_pt->next_pt != NULL))
-                    internal_error("<noun-declension> too complex");
-                if (((c < nc) && (num == 1)) || ((c >= nc) && (num == 2))) {
-                    TEMPORARY_TEXT(stem);
-                    TEMPORARY_TEXT(result);
-                    WRITE_TO(stem, "%+W", W);
-                    Inflections::follow_suffix_instruction(result, stem,
-                        Vocabulary::get_exemplar(pr->first_pt->ve_pt, TRUE));
-                    D.name_cased[c%nc] = Feeds::feed_text(result);
-                    DISCARD_TEXT(stem);
-                    DISCARD_TEXT(result);
-                }
-                c++;
-            }
-            if (c < 2*nc) internal_error("too few cases in declension");
-            if (c > 2*nc) internal_error("too many cases in declension");
-            return D;
-        }
-    }
-    internal_error("declination unavailable");
-    return D;
-}
-
-wording Declensions::in_case(declension *D, int c) {
-    if ((c < 0) || (c >= Declensions::no_cases(D->within_language))) internal_error("case out of range");
-    return D->name_cased[c];
-}
-
-int Declensions::no_cases(NATURAL_LANGUAGE_WORDS_TYPE *nl) {
+int Declensions::no_cases(NATURAL_LANGUAGE_WORDS_TYPE *nl) {
     nonterminal *nt = <grammatical-case-names>;
     for (production_list *pl = nt->first_pl; pl; pl = pl->next_pl) {
         if ((pl->definition_language == NULL) || (pl->definition_language == nl)) {
@@ -267,12 +119,17 @@ function togglePopup(material_id) {
     internal_error("<grammatical-case-names> not provided for this language");
     return -1;
 }
+
+

§3. The following is useful for debugging: +

+
 void Declensions::writer(OUTPUT_STREAM, declension *D, declension *AD) {
     nonterminal *nt = <grammatical-case-names>;
-    int nc = Declensions::no_cases(D->within_language);
+    int nc = Declensions::no_cases(D->within_language);
     for (production_list *pl = nt->first_pl; pl; pl = pl->next_pl) {
-        if ((pl->definition_language == NULL) || (pl->definition_language == D->within_language)) {
+        if ((pl->definition_language == NULL) ||
+            (pl->definition_language == D->within_language)) {
             int c = 0;
             for (production *pr = pl->first_pr; pr; pr = pr->next_pr) {
                 if ((pr->first_pt == NULL) ||
@@ -292,8 +149,231 @@ function togglePopup(material_id) {
     internal_error("<grammatical-case-names> not provided for this language");
 }
 
+

§4. And this function extracts the right form for a given case c: +

+ +
+wording Declensions::in_case(declension *D, int c) {
+    if ((c < 0) || (c >= Declensions::no_cases(D->within_language)))
+        internal_error("case out of range");
+    return D->name_cased[c];
+}
+
+

§5. So much for using declensions; now to generate them. They are inflected from +the stem by special Preform nonterminals: +

+ +
+declension Declensions::of_noun(wording W, NATURAL_LANGUAGE_WORDS_TYPE *nl,
+    int gen, int num) {
+    nl = DefaultLanguage::get(nl);
+    declension D = Declensions::decline_inner(W, nl, gen, num, <noun-declension>);
+    Fix the origin5.1;
+    return D;
+}
+
+declension Declensions::of_article(wording W, NATURAL_LANGUAGE_WORDS_TYPE *nl,
+    int gen, int num) {
+    nl = DefaultLanguage::get(nl);
+    declension D = Declensions::decline_inner(W, nl, gen, num, <article-declension>);
+    Fix the origin5.1;
+    return D;
+}
+
+

§5.1. If a word comes from a given file and line number in the source text, then +we will say that so does any inflected form of it: +

+ +

Fix the origin5.1 = +

+ +
+    for (int c = 0; c < Declensions::no_cases(nl); c++)
+        LOOP_THROUGH_WORDING(i, D.name_cased[c])
+            Lexer::set_word_location(i, Lexer::word_location(Wordings::first_wn(W)));
+
+ +

§6. For the format of the table expressed by the nonterminal nt, see +What This Module Does. +

+ +
+declension Declensions::decline_inner(wording W, NATURAL_LANGUAGE_WORDS_TYPE *nl,
+    int gen, int num, nonterminal *nt) {
+    nl = DefaultLanguage::get(nl);
+    declension D;
+    D.within_language = nl;
+    for (production_list *pl = nt->first_pl; pl; pl = pl->next_pl) {
+        if ((pl->definition_language == NULL) || (pl->definition_language == nl)) {
+            for (production *pr = pl->first_pr; pr; pr = pr->next_pr) {
+                if ((pr->first_pt == NULL) ||
+                    (pr->first_pt->ptoken_category != FIXED_WORD_PTC) ||
+                    (pr->first_pt->next_pt == NULL) ||
+                    (pr->first_pt->next_pt->ptoken_category != NONTERMINAL_PTC))
+                    internal_error("line in <noun-declension> malformed");
+                wchar_t *gender_letter = Vocabulary::get_exemplar(pr->first_pt->ve_pt, FALSE);
+                if ((gender_letter[0] == '*') ||
+                    ((gender_letter[0] == 'm') && (gen == MASCULINE_GENDER)) ||
+                    ((gender_letter[0] == 'f') && (gen == FEMININE_GENDER)) ||
+                    ((gender_letter[0] == 'n') && (gen == NEUTER_GENDER)))
+                    Decline according to this row in declension NT6.1;
+            }
+        }
+    }
+    internal_error("no declension table terminated");
+    return D;
+}
+
+

§6.1. Decline according to this row in declension NT6.1 = +

+ +
+    int found = FALSE;
+    nonterminal *gnt = pr->first_pt->next_pt->nt_pt;
+    if (pr->first_pt->next_pt->next_pt == NULL) {
+        D = Declensions::decline_from_irregulars(W, nl, gnt, num, &found);
+    } else {
+        if ((pr->first_pt->next_pt->next_pt->ptoken_category != NONTERMINAL_PTC) ||
+            (pr->first_pt->next_pt->next_pt->next_pt != NULL))
+            internal_error("this line must end with two nonterminals");
+        nonterminal *tnt = pr->first_pt->next_pt->next_pt->nt_pt;
+        D = Declensions::decline_from_groups(W, nl, gnt, tnt, num, &found);
+    }
+    if (found) return D;
+
+ +

§7. This is for the two-token form of row, gender table: +

+ +
+declension Declensions::decline_from_irregulars(wording W, NATURAL_LANGUAGE_WORDS_TYPE *nl,
+    nonterminal *gnt, int num, int *found) {
+    *found = FALSE;
+    declension D;
+    D.within_language = nl;
+    if (Wordings::length(W) == 1)
+        for (production_list *pl = gnt->first_pl; pl; pl = pl->next_pl)
+            if ((pl->definition_language == NULL) || (pl->definition_language == nl))
+                for (production *pr = pl->first_pr; pr; pr = pr->next_pr) {
+                    vocabulary_entry *stem = pr->first_pt->ve_pt;
+                    if (stem == Lexer::word(Wordings::first_wn(W))) {
+                        *found = TRUE;
+                        int c = 0, nc = Declensions::no_cases(nl);
+                        for (ptoken *pt = pr->first_pt->next_pt; pt; pt = pt->next_pt) {
+                            if (pt->ptoken_category != FIXED_WORD_PTC)
+                                internal_error("NTs are not allowed in irregular decs");
+                            if (((num == 1) && (c < nc)) || ((num == 2) && (c >= nc))) {
+                                TEMPORARY_TEXT(stem);
+                                TEMPORARY_TEXT(result);
+                                WRITE_TO(stem, "%W", W);
+                                Inflect::follow_suffix_instruction(result, stem,
+                                    Vocabulary::get_exemplar(pt->ve_pt, TRUE));
+                                D.name_cased[c%nc] = Feeds::feed_text(result);
+                                DISCARD_TEXT(stem);
+                                DISCARD_TEXT(result);
+                            }
+                            c++;
+                        }
+                        if (c < 2*nc) internal_error("too few cases in irregular ded");
+                        if (c > 2*nc) internal_error("too many cases in irregular dec");
+                        return D;
+                    }
+                }
+    return D;
+}
+
+

§8. And this is for the three-token form of row, gender grouper table: +

+ +
+declension Declensions::decline_from_groups(wording W, NATURAL_LANGUAGE_WORDS_TYPE *nl,
+    nonterminal *gnt, nonterminal *nt, int num, int *found) {
+    declension D;
+    D.within_language = nl;
+    TEMPORARY_TEXT(from);
+    WRITE_TO(from, "%+W", W);
+    match_avinue *group_trie = PreformUtilities::define_trie(gnt, TRIE_END,
+        DefaultLanguage::get(nl));
+    wchar_t *result = Tries::search_avinue(group_trie, from);
+    DISCARD_TEXT(from);
+    if (result == NULL) {
+        *found = FALSE;
+    } else {
+        *found = TRUE;
+        int group;
+        Set the group number8.1;
+        for (production_list *pl = nt->first_pl; pl; pl = pl->next_pl)
+            if ((pl->definition_language == NULL) || (pl->definition_language == nl))
+                for (production *pr = pl->first_pr; pr; pr = pr->next_pr) {
+                    if ((pr->first_pt == NULL) ||
+                        (pr->first_pt->ptoken_category != NONTERMINAL_PTC) ||
+                        (pr->first_pt->next_pt != NULL))
+                        internal_error("noun declension nonterminal malformed");
+                    if (--group == 0)
+                        return Declensions::decline_from(W, nl, pr->first_pt->nt_pt, num);
+                }
+        internal_error("noun declension nonterminal has too few groups");
+    }
+    return D;
+}
+
+

§8.1. Set the group number8.1 = +

+ +
+    group = result[0] - '0';
+    if ((group <= 0) || (group > 9))
+        internal_error("noun declension grouper result not a group number");
+    if (result[1]) {
+        int u = result[1] - '0';
+        if ((u < 0) || (u > 9))
+            internal_error("noun declension grouper result not a group number");
+        group = group*10 + u;
+        if (result[2]) internal_error("noun declension grouper result too high");
+    }
+
+ +

§9. We have now found the actual declension table NT; if there are \(N\) cases +in the language, there will be \(2N\) productions in this table, each of which +consists of a single word giving the rewriting instruction to use. +

+ +
+declension Declensions::decline_from(wording W, NATURAL_LANGUAGE_WORDS_TYPE *nl,
+    nonterminal *nt, int num) {
+    int c = 0, nc = Declensions::no_cases(nl);
+    declension D;
+    D.within_language = nl;
+    for (production_list *pl = nt->first_pl; pl; pl = pl->next_pl) {
+        if ((pl->definition_language == NULL) || (pl->definition_language == nl)) {
+            for (production *pr = pl->first_pr; pr; pr = pr->next_pr) {
+                if ((pr->first_pt == NULL) ||
+                    (pr->first_pt->ptoken_category != FIXED_WORD_PTC) ||
+                    (pr->first_pt->next_pt != NULL))
+                    internal_error("<noun-declension> too complex");
+                if (((c < nc) && (num == 1)) || ((c >= nc) && (num == 2))) {
+                    TEMPORARY_TEXT(stem);
+                    TEMPORARY_TEXT(result);
+                    WRITE_TO(stem, "%+W", W);
+                    Inflect::follow_suffix_instruction(result, stem,
+                        Vocabulary::get_exemplar(pr->first_pt->ve_pt, TRUE));
+                    D.name_cased[c%nc] = Feeds::feed_text(result);
+                    DISCARD_TEXT(stem);
+                    DISCARD_TEXT(result);
+                }
+                c++;
+            }
+            if (c < 2*nc) internal_error("too few cases in declension");
+            if (c > 2*nc) internal_error("too many cases in declension");
+            return D;
+        }
+    }
+    internal_error("declination unavailable");
+    return D;
+}
+
diff --git a/docs/inflections-module/2-ld.html b/docs/inflections-module/3-lc.html similarity index 74% rename from docs/inflections-module/2-ld.html rename to docs/inflections-module/3-lc.html index fe2695c28..eb547f833 100644 --- a/docs/inflections-module/2-ld.html +++ b/docs/inflections-module/3-lc.html @@ -1,7 +1,7 @@ - Linguistic Definitions + Linguistic Constants @@ -12,14 +12,6 @@ - - - @@ -61,12 +53,12 @@ function togglePopup(material_id) {
- + +

Some basic linguistic constants are defined.

-
+

§1. Constants. First, we support three genders:

@@ -116,12 +108,12 @@ in English. Some languages can use optional extras; French, for example, uses tense 5 for the past historic.

-
define NO_KNOWN_TENSES 7  allowing for two optional extras in non-English languages
-define IS_TENSE 0		 Present
-define WAS_TENSE 1 		 Past
-define HASBEEN_TENSE 2 	 Present perfect
-define HADBEEN_TENSE 3 	 Past perfect
-define WILLBE_TENSE 4 	 Future (not used in assertions or conditions)
+
define NO_KNOWN_TENSES 7
+define IS_TENSE 0        Present
+define WAS_TENSE 1       Past
+define HASBEEN_TENSE 2   Present perfect
+define HADBEEN_TENSE 3   Past perfect
+define WILLBE_TENSE 4    Future (not used in assertions or conditions)
 define CUSTOM1_TENSE 5
 define CUSTOM2_TENSE 6
 
@@ -139,24 +131,8 @@ tense 5 for the past historic. } }
-

§7. A default language. The following is in effect also a constant; Inform sets it to English early -in its run. -

- -
-NATURAL_LANGUAGE_WORDS_TYPE *default_language_for_linguistics = NULL;
-
-void InflectionDefns::set_default_nl(NATURAL_LANGUAGE_WORDS_TYPE *nl) {
-    default_language_for_linguistics = nl;
-}
-
-NATURAL_LANGUAGE_WORDS_TYPE *InflectionDefns::default_nl(NATURAL_LANGUAGE_WORDS_TYPE *nl) {
-    if (nl) return nl;
-    return default_language_for_linguistics;
-}
-
diff --git a/docs/inflections-module/3-nc.html b/docs/inflections-module/3-nc.html index 78bd8a92d..9f1b9473f 100644 --- a/docs/inflections-module/3-nc.html +++ b/docs/inflections-module/3-nc.html @@ -63,7 +63,7 @@ function togglePopup(material_id) {
+

Name clusters are sets of noun or adjective forms, perhaps multiple or in multiple languages, which have in common that they share a meaning.


@@ -112,10 +112,10 @@ with lingistic roles. For example, the cluster of names for the common noun
 individual_name *Clusters::add_one(name_cluster *names, wording W,
     NATURAL_LANGUAGE_WORDS_TYPE *nl, int gender, int number) {
-    nl = InflectionDefns::default_nl(nl);
+    nl = DefaultLanguage::get(nl);
     individual_name *in = CREATE(individual_name);
     in->principal_meaning = NULL_GENERAL_POINTER;
-    in->name = Declensions::decline(W, nl, gender, number);
+    in->name = Declensions::of_noun(W, nl, gender, number);
     in->name_language = nl;
     in->name_number = number;
     in->name_gender = gender;
@@ -149,7 +149,7 @@ so there may be any number of names registered: for instance, the kind
     do {
         k++;
         wording PW = EMPTY_WORDING;
-        pde = Pluralisation::make(W, &PW, pde, nl);
+        pde = Pluralisation::make(W, &PW, pde, nl);
         if (Wordings::nonempty(PW)) {
             LOGIF(CONSTRUCTED_PLURALS, "(%d) Plural of <%W>: <%W>\n", k, W, PW);
             individual_name *in = Clusters::add_one(names, PW, nl, gender, 2);
@@ -172,8 +172,8 @@ combinations. Here we only work through six, ignoring animation:
 
 void Clusters::add_with_agreements(name_cluster *cl, wording W,
     NATURAL_LANGUAGE_WORDS_TYPE *nl) {
-    nl = InflectionDefns::default_nl(nl);
-    if (nl == InflectionDefns::default_nl(NULL))
+    nl = DefaultLanguage::get(nl);
+    if (nl == DefaultLanguage::get(NULL))
         Clusters::add(cl, W, nl, NEUTER_GENDER, 1, FALSE);
     else
         for (int gna = 0; gna < 6; gna++)
@@ -220,13 +220,13 @@ through one or two tries.
 
     word_assemblage wa = WordAssemblages::from_wording(W);
     if (step1)
-        wa = Inflections::apply_trie_to_wa(wa,
+        wa = Inflect::first_word(wa,
             PreformUtilities::define_trie(step1, TRIE_END,
-                InflectionDefns::default_nl(nl)));
+                DefaultLanguage::get(nl)));
     if (step2)
-        wa = Inflections::apply_trie_to_wa(wa,
+        wa = Inflect::first_word(wa,
             PreformUtilities::define_trie(step2, TRIE_END,
-                InflectionDefns::default_nl(nl)));
+                DefaultLanguage::get(nl)));
     FW = WordAssemblages::to_wording(&wa);
 
  • This code is used in §4.1.
@@ -243,7 +243,7 @@ and wouldn't pass through the pluralising tries intact. individual_name *in; LOOP_OVER_LINKED_LIST(in, individual_name, cl->listed) if (in->name_number == 2) { - in->name = Declensions::decline(W, nl, NEUTER_GENDER, 2); + in->name = Declensions::of_noun(W, nl, NEUTER_GENDER, 2); return; } Clusters::add(cl, W, NULL, NEUTER_GENDER, 2, FALSE); @@ -264,7 +264,7 @@ or plural): individual_name *in; LOOP_OVER_LINKED_LIST(in, individual_name, cl->listed) if (in->name_number == number_sought) - return Declensions::in_case(&(in->name), NOMINATIVE_CASE); + return Declensions::in_case(&(in->name), NOMINATIVE_CASE); return EMPTY_WORDING; }
@@ -281,7 +281,7 @@ falling back on English if there's none registered: LOOP_OVER_LINKED_LIST(in, individual_name, cl->listed) if ((in->name_number == number_sought) && (in->name_language == nl)) - return Declensions::in_case(&(in->name), NOMINATIVE_CASE); + return Declensions::in_case(&(in->name), NOMINATIVE_CASE); return Clusters::get_name(cl, plural_flag); }
@@ -296,7 +296,7 @@ falling back on English if there's none registered: if (((number_sought == -1) || (number_sought == in->name_number)) && ((gender_sought == -1) || (gender_sought == in->name_gender)) && (in->name_language == nl)) - return Declensions::in_case(&(in->name), NOMINATIVE_CASE); + return Declensions::in_case(&(in->name), NOMINATIVE_CASE); return EMPTY_WORDING; } @@ -319,7 +319,7 @@ to an excerpt_meaning< }
diff --git a/docs/inflections-module/3-vc.html b/docs/inflections-module/3-vc.html index 46cb2a39b..e459e9f6f 100644 --- a/docs/inflections-module/3-vc.html +++ b/docs/inflections-module/3-vc.html @@ -64,10 +64,10 @@ function togglePopup(material_id) {
+

Conjugating verbs into the many different forms they can take.

-
+

§1. We will need to turn a base form of a verb — in English, this is always the infinitive — into up to 123 variants; we manage this with quite an extensive @@ -103,13 +103,101 @@ English it looks wasteful, since so many forms are the same, but for French int modal_auxiliary_usage[NO_KNOWN_TENSES][2][6]; } verb_tabulation; -

-

§2. Making conjugations. The following will make more sense if read alongside the examples in "English -Inflections", which explains the format in full. In fact English itself is a -little tame, though — try the French Language extension for the real deal. +

+

§2. Finding. Most of the time, conjugations can be identified by their infinitives:

-

The crucial early step here is Conjugation::follow_instructions, which has +

+verb_conjugation *Conjugation::find_by_infinitive(word_assemblage infinitive) {
+    verb_conjugation *vc;
+    LOOP_OVER(vc, verb_conjugation)
+        if (WordAssemblages::eq(&infinitive, &(vc->infinitive)))
+            return vc;
+    return NULL;
+}
+
+

§3. But in fact multiple conjugations can be given with the same infinitive... +

+ +
+verb_conjugation *Conjugation::find_prior(verb_conjugation *nvc) {
+    if (nvc == NULL) return NULL;
+    verb_conjugation *vc;
+    LOOP_OVER(vc, verb_conjugation)
+        if ((vc != nvc) && (Conjugation::eq(nvc, vc)))
+            return vc;
+    return NULL;
+}
+
+

§4. ...and those may or may not be identical, so a more detailed test is: +

+ +
+int Conjugation::eq(verb_conjugation *nvc, verb_conjugation *vc) {
+    if ((WordAssemblages::eq(&(nvc->infinitive), &(vc->infinitive))) &&
+        (WordAssemblages::eq(&(nvc->past_participle), &(vc->past_participle))) &&
+        (WordAssemblages::eq(&(nvc->present_participle), &(vc->present_participle)))) {
+        for (int i=0; i<NO_KNOWN_MOODS; i++) {
+            verb_tabulation *nvt = &(nvc->tabulations[i]);
+            verb_tabulation *vt = &(vc->tabulations[i]);
+            if (WordAssemblages::eq(
+                &(nvt->to_be_auxiliary), &(vt->to_be_auxiliary)) == FALSE) return FALSE;
+            for (int p=0; p<6; p++)
+                for (int s=0; s<2; s++)
+                    for (int t=0; t<NO_KNOWN_TENSES; t++) {
+                        if (WordAssemblages::eq(
+                            &(nvt->vc_text[t][s][p]), &(vt->vc_text[t][s][p])) == FALSE)
+                                return FALSE;
+                        if (nvt->modal_auxiliary_usage[t][s][p] !=
+                            vt->modal_auxiliary_usage[t][s][p]) return FALSE;
+                    }
+        }
+        return TRUE;
+    }
+    return FALSE;
+}
+
+

§5. The following prints out a tidy form of a verb conjugation table: +

+ +
+void Conjugation::write(OUTPUT_STREAM, verb_conjugation *vc) {
+    WRITE("Infinitive: %A / Present participle: %A / Past participle: %A^",
+        &(vc->infinitive), &(vc->present_participle), &(vc->past_participle));
+    int mood_count = 2;
+    if (WordAssemblages::nonempty(vc->tabulations[PASSIVE_MOOD].to_be_auxiliary))
+        mood_count = 1;
+    int mood, sense, tense, person;
+    for (mood=0; mood<mood_count; mood++) {
+        for (sense=0; sense<2; sense++) {
+            if (mood == 0) WRITE("Active "); else WRITE("Passive ");
+            if (sense == 0) WRITE("positive^"); else WRITE("negative^");
+            for (tense=0; tense<7; tense++) {
+                WRITE("Tense %d: ", tense);
+                for (person=0; person<6; person++) {
+                    word_assemblage *wa;
+                    if (mood == 0)
+                        wa = &(vc->tabulations[ACTIVE_MOOD].vc_text[tense][sense][person]);
+                    else
+                        wa = &(vc->tabulations[PASSIVE_MOOD].vc_text[tense][sense][person]);
+                    if (person > 0) WRITE(" / ");
+                    if (WordAssemblages::nonempty(*wa)) WRITE("%A", wa);
+                    else WRITE("--");
+                }
+                WRITE("^");
+            }
+        }
+    }
+    if (WordAssemblages::nonempty(vc->tabulations[PASSIVE_MOOD].to_be_auxiliary))
+        WRITE("Form passive as to be + %A\n",
+            &(vc->tabulations[PASSIVE_MOOD].to_be_auxiliary));
+}
+
+

§6. Making conjugations. The following will make more sense if read alongside the examples in "English +Inflections", which explains the format in full. +

+ +

The crucial early step here is Conjugation::follow_instructions, which has two tasks to perform: it works out the numbered verb forms, and it chooses which tabulation will be used. Verb form number 0 is always the base text, and subsequent numbers include some which are universal across all verbs @@ -118,37 +206,37 @@ conjugation to another.

-verb_conjugation *Conjugation::conjugate(word_assemblage base_text,
+verb_conjugation *Conjugation::conjugate(word_assemblage base_text,
     NATURAL_LANGUAGE_WORDS_TYPE *nl) {
-    return Conjugation::conjugate_with_overrides(base_text, NULL, 0, nl);
+    return Conjugation::conjugate_with_overrides(base_text, NULL, 0, nl);
 }
 
 verb_conjugation *Conjugation::conjugate_with_overrides(word_assemblage base_text,
     word_assemblage *overrides, int no_overrides, NATURAL_LANGUAGE_WORDS_TYPE *nl) {
-    nl = InflectionDefns::default_nl(nl);
+    nl = DefaultLanguage::get(nl);
     if (WordAssemblages::nonempty(base_text) == FALSE)
         internal_error("No base text for verb conjugation");
 
     word_assemblage verb_forms[MAX_FORM_TYPES+1];
-    Initialise all verb forms to the base text2.1;
+    Initialise all verb forms to the base text6.1;
 
     int n = 1, aux_len = 0, avo_flag = FALSE, niv_flag = FALSE;
     nonterminal *tabulation =
-        Conjugation::follow_instructions(verb_forms, &n, &aux_len, &avo_flag, &niv_flag, nl);
+        Conjugation::follow_instructions(verb_forms, &n, &aux_len, &avo_flag, &niv_flag, nl);
 
-    Override any verb forms with supplied irregularities2.2;
-    Use the verb forms and the tabulation to make the conjugation2.3;
+    Override any verb forms with supplied irregularities6.2;
+    Use the verb forms and the tabulation to make the conjugation6.3;
 }
 
-

§2.1. Initialise all verb forms to the base text2.1 = +

§6.1. Initialise all verb forms to the base text6.1 =

     int k;
     for (k=0; k<=MAX_FORM_TYPES; k++) verb_forms[k] = base_text;
 
- -

§2.2. This feature is provided so that English verb definitions can override the +

+

§6.2. This feature is provided so that English verb definitions can override the usual grammatical rules, which enables us to create new irregular verbs. For example, Inform will by default make the past participle "blended" out of the verb "to blend", but a definition like @@ -166,7 +254,7 @@ anybody else try this one on.)

Note that verb form 0 can't be overridden: that was the base text.

-

Override any verb forms with supplied irregularities2.2 = +

Override any verb forms with supplied irregularities6.2 =

@@ -175,8 +263,8 @@ anybody else try this one on.)
         if (WordAssemblages::nonempty(overrides[k]))
             verb_forms[k] = overrides[k];
 
- -

§2.3. Use the verb forms and the tabulation to make the conjugation2.3 = +

+

§6.3. Use the verb forms and the tabulation to make the conjugation6.3 =

@@ -195,13 +283,13 @@ anybody else try this one on.)
     vc->vc_iname = NULL;
     #endif
 
-    Start by blanking out all the passive and active slots2.3.1;
-    Work through the supplied tabulation, filling in slots as directed2.3.2;
+    Start by blanking out all the passive and active slots6.3.1;
+    Work through the supplied tabulation, filling in slots as directed6.3.2;
 
     return vc;
 
- -

§2.3.1. Start by blanking out all the passive and active slots2.3.1 = +

+

§6.3.1. Start by blanking out all the passive and active slots6.3.1 =

@@ -211,24 +299,26 @@ anybody else try this one on.)
     for (tense=0; tense<NO_KNOWN_TENSES; tense++)
         for (sense=0; sense<2; sense++)
             for (i=0; i<6; i++) {
-                vc->tabulations[ACTIVE_MOOD].vc_text[tense][sense][i] = WordAssemblages::lit_0();
-                vc->tabulations[PASSIVE_MOOD].vc_text[tense][sense][i] = WordAssemblages::lit_0();
+                vc->tabulations[ACTIVE_MOOD].vc_text[tense][sense][i] =
+                    WordAssemblages::lit_0();
+                vc->tabulations[PASSIVE_MOOD].vc_text[tense][sense][i] =
+                    WordAssemblages::lit_0();
             }
 
- -

§2.3.2. A tabulation is a sort of program laying out what to put in which slots, +

+

§6.3.2. A tabulation is a sort of program laying out what to put in which slots, active or passive. Each production is a step in this program, and it consists of a "selector" followed by a "line". For example, the production:

-
-    a3 ( t1 avoir ) 3+*
+
+    a3 ( t1 avoir ) 3+*
 
-

contains six tokens; the selector is a3, and the line is made up from the +

contains six tokens; the selector is a3, and the line is made up from the rest. (The selector is always just a single token.)

-

Work through the supplied tabulation, filling in slots as directed2.3.2 = +

Work through the supplied tabulation, filling in slots as directed6.3.2 =

@@ -239,49 +329,61 @@ rest. (The selector is always just a single token.)
             for (pr = pl->first_pr; pr; pr = pr->next_pr) {
                 ptoken *selector = pr->first_pt;
                 ptoken *line = (selector)?(selector->next_pt):NULL;
-                if ((selector) && (selector->ptoken_category == FIXED_WORD_PTC) && (line)) {
-                    Apply the given tabulation line to the slots selected2.3.2.1;
-                } else Conjugation::error(base_text, tabulation, pr,
+                if ((selector) && (selector->ptoken_category == FIXED_WORD_PTC) &&
+                    (line)) {
+                    Apply the given tabulation line to the slots selected6.3.2.1;
+                } else Conjugation::error(base_text, tabulation, pr,
                     "tabulation row doesn't consist of a selector and then text");
             }
         }
     }
 
-
  • This code is used in §2.3.
-

§2.3.2.1. Apply the given tabulation line to the slots selected2.3.2.1 = +

  • This code is used in §6.3.
+

§6.3.2.1. Apply the given tabulation line to the slots selected6.3.2.1 =

     int active_set = NOT_APPLICABLE, tense_set = -1, sense_set = -1, set_tba = FALSE;
-    Parse the slot selector2.3.2.1.1;
+    Parse the slot selector6.3.2.1.3;
 
     if (set_tba)
         vc->tabulations[PASSIVE_MOOD].to_be_auxiliary =
-            Conjugation::merge(line, 0, 0, 0, MAX_FORM_TYPES+1, verb_forms, nl, NULL);
+            Conjugation::merge(line, 0, 0, 0, MAX_FORM_TYPES+1, verb_forms, nl, NULL);
 
-    int person, tense, sense;
-    for (tense=0; tense<NO_KNOWN_TENSES; tense++)
-        for (sense=0; sense<2; sense++)
-            for (person=0; person<6; person++) {
+    for (int tense=0; tense<NO_KNOWN_TENSES; tense++)
+        for (int sense=0; sense<2; sense++)
+            for (int person=0; person<6; person++) {
                 if ((sense_set >= 0) && (sense != sense_set)) continue;
                 if ((tense_set >= 0) && (tense != tense_set)) continue;
-                if (active_set)
-                    vc->tabulations[ACTIVE_MOOD].vc_text[tense][sense][person] =
-                        Conjugation::merge(line, sense, tense, person, MAX_FORM_TYPES+1, verb_forms, nl,
-                        &(vc->tabulations[ACTIVE_MOOD].modal_auxiliary_usage[tense][sense][person]));
-                else
-                    vc->tabulations[PASSIVE_MOOD].vc_text[tense][sense][person] =
-                        Conjugation::merge(line, sense, tense, person, MAX_FORM_TYPES+1, verb_forms, nl,
-                        &(vc->tabulations[PASSIVE_MOOD].modal_auxiliary_usage[tense][sense][person]));
+                if (active_set) Apply to the active mood6.3.2.1.1
+                else Apply to the passive mood6.3.2.1.2;
             }
 
- -

§2.3.2.1.1. The selector tells us which tense(s), sense(s) and mood(s) to apply the +

+

§6.3.2.1.1. Apply to the active mood6.3.2.1.1 = +

+ +
+    vc->tabulations[ACTIVE_MOOD].vc_text[tense][sense][person] =
+        Conjugation::merge(line, sense, tense, person, MAX_FORM_TYPES+1, verb_forms, nl,
+        &(vc->tabulations[ACTIVE_MOOD].modal_auxiliary_usage[tense][sense][person]));
+
+ +

§6.3.2.1.2. Apply to the passive mood6.3.2.1.2 = +

+ +
+    vc->tabulations[PASSIVE_MOOD].vc_text[tense][sense][person] =
+        Conjugation::merge(line, sense, tense, person, MAX_FORM_TYPES+1, verb_forms, nl,
+        &(vc->tabulations[PASSIVE_MOOD].modal_auxiliary_usage[tense][sense][person]));
+
+ +

§6.3.2.1.3. The selector tells us which tense(s), sense(s) and mood(s) to apply the line to; a3, for example, means active mood, tense 3, in both positive and negative senses.

-

Parse the slot selector2.3.2.1.1 = +

Parse the slot selector6.3.2.1.3 =

@@ -290,7 +392,7 @@ and negative senses.
     if (p[0] == 'a') active_set = TRUE;
     if (p[0] == 'p') active_set = FALSE;
     if (active_set == NOT_APPLICABLE)
-        Conjugation::error(base_text, tabulation, pr,
+        Conjugation::error(base_text, tabulation, pr,
             "tabulation row doesn't begin with 'a' or 'p'");
     int at = 1;
     if (Characters::isdigit(p[at])) { tense_set = p[at++]-'1'; }
@@ -301,26 +403,30 @@ and negative senses.
     }
     if (p[at] != 0) {
         LOG("The selector here is: <%w>\n", p);
-        Conjugation::error(base_text, tabulation, pr,
+        Conjugation::error(base_text, tabulation, pr,
             "unrecognised selector in tabulation row");
     }
 
- -

§3.

+ +

§7. This routine is really an interloper from core. It provides the run-time +values representing verbs in story files compiled by Inform. +

 #ifdef CORE_MODULE
 inter_name *Conjugation::conj_iname(verb_conjugation *vc) {
     if (vc->vc_iname == NULL) {
         if (vc->vc_conjugates == NULL) {
-            package_request *R = Hierarchy::package(Modules::find(vc->where_vc_created), MVERBS_HAP);
+            package_request *R =
+                Hierarchy::package(Modules::find(vc->where_vc_created), MVERBS_HAP);
             TEMPORARY_TEXT(ANT);
             WRITE_TO(ANT, "%A (modal)", vc->tabulations[ACTIVE_MOOD].vc_text[0][0][2]);
             Hierarchy::markup(R, MVERB_NAME_HMD, ANT);
             DISCARD_TEXT(ANT);
             vc->vc_iname = Hierarchy::make_iname_in(MODAL_CONJUGATION_FN_HL, R);
         } else {
-            package_request *R = Verbs::verb_package(vc->vc_conjugates, vc->where_vc_created);
+            package_request *R =
+                Verbs::verb_package(vc->vc_conjugates, vc->where_vc_created);
             TEMPORARY_TEXT(ANT);
             WRITE_TO(ANT, "to %A", vc->infinitive);
             Hierarchy::markup(R, VERB_NAME_HMD, ANT);
@@ -332,7 +438,7 @@ and negative senses.
 }
 #endif
 
-

§4. Follow instructions. That completes the top level of the routine, but it depended on two major +

§8. Follow instructions. That completes the top level of the routine, but it depended on two major sub-steps: a preliminary pass called Conjugation::follow_instructions and a routine to deal with the final results called Conjugation::merge.

@@ -347,24 +453,25 @@ participles and then chooses the tabulation -nonterminal *Conjugation::follow_instructions(word_assemblage *verb_forms, int *highest_form_written, - int *aux_len, int *avo_flag, int *niv_flag, NATURAL_LANGUAGE_WORDS_TYPE *nl) { +nonterminal *Conjugation::follow_instructions(word_assemblage *verb_forms, + int *highest_form_written, int *aux_len, int *avo_flag, int *niv_flag, + NATURAL_LANGUAGE_WORDS_TYPE *nl) { nonterminal *instructions_nt = <verb-conjugation-instructions>; nonterminal *tabulation_nt = NULL, *conjugation_nt = NULL; *highest_form_written = 1; *aux_len = 0; *avo_flag = FALSE; *niv_flag = FALSE; - Pattern match on the base text to decide which conjugation to use4.1; + Pattern match on the base text to decide which conjugation to use8.1; if (conjugation_nt == NULL) - Conjugation::error(verb_forms[0], instructions_nt, NULL, + Conjugation::error(verb_forms[0], instructions_nt, NULL, "the instructions here failed to choose a conjugation"); - Process the conjugation and determine the tabulation4.2; + Process the conjugation and determine the tabulation8.2; if (tabulation_nt == NULL) - Conjugation::error(verb_forms[0], conjugation_nt, NULL, + Conjugation::error(verb_forms[0], conjugation_nt, NULL, "the conjugation here failed to choose a tabulation"); return tabulation_nt; }
-

§4.1. Pattern match on the base text to decide which conjugation to use4.1 = +

§8.1. Pattern match on the base text to decide which conjugation to use8.1 =

@@ -377,34 +484,34 @@ participles and then chooses the tabulation         if (nl == pl->definition_language) {
             production *pr;
             for (pr = pl->first_pr; pr; pr = pr->next_pr) {
-                Try to match the base text against this production4.1.1;
+                Try to match the base text against this production8.1.1;
             }
         }
     }
 
- -

§4.1.1. Each production in this language's <verb-conjugation-instructions> grammar +

+

§8.1.1. Each production in this language's <verb-conjugation-instructions> grammar consists of a (possibly empty) pattern to match, followed by the name of a nonterminal to use as the conjugation if it matches. For example, in

-
-    -querir <fr-querir-conjugation>
+
+    -querir <fr-querir-conjugation>
 
-

the pattern part is a single token, -querir, which matches if the base text +

the pattern part is a single token, -querir, which matches if the base text is a single word whose last six characters are "querir". A more complicated case is:

-
-    be able to ... <to-be-able-to-auxiliary>
+
+    be able to ... <to-be-able-to-auxiliary>
 
-

Here the wildcard ... matches one or more words, and the "auxiliary -infinitive" form is set to the part matched by ...: for example, +

Here the wildcard ... matches one or more words, and the "auxiliary +infinitive" form is set to the part matched by ...: for example, "be able to see" matches with auxiliary infinitive "see".

-

Try to match the base text against this production4.1.1 = +

Try to match the base text against this production8.1.1 =

@@ -414,22 +521,23 @@ infinitive" form is set to the part matched by     if ((len >= 1) && (last->ptoken_category == NONTERMINAL_PTC)) {
         if (conjugation_nt == NULL) {  i.e., if we have not yet chosen a conjugation
             int failed_to_match = FALSE, wildcard_from = -1;
-            Try to match the base text against the pattern part of the production4.1.1.1;
+            Try to match the base text against the pattern part of the production8.1.1.1;
             if (failed_to_match == FALSE) {
                 conjugation_nt = last->nt_pt;
                 verb_forms[ADJOINT_INFINITIVE_FORM_TYPE] = verb_forms[BASE_FORM_TYPE];
                 if (wildcard_from > 0)
-                    WordAssemblages::truncate(&(verb_forms[ADJOINT_INFINITIVE_FORM_TYPE]), wildcard_from);
+                    WordAssemblages::truncate(
+                        &(verb_forms[ADJOINT_INFINITIVE_FORM_TYPE]), wildcard_from);
                 *aux_len = wildcard_from;
             }
         }
     } else malformed = TRUE;
     if (malformed)
-        Conjugation::error(verb_forms[BASE_FORM_TYPE], <verb-conjugation-instructions>, pr,
+        Conjugation::error(verb_forms[BASE_FORM_TYPE], <verb-conjugation-instructions>, pr,
             "malformed line");
 
-
  • This code is used in §4.1.
-

§4.1.1.1. Try to match the base text against the pattern part of the production4.1.1.1 = +

  • This code is used in §8.1.
+

§8.1.1.1. Try to match the base text against the pattern part of the production8.1.1.1 =

@@ -437,7 +545,7 @@ infinitive" form is set to the part matched by     for (pt = pr->first_pt; ((pt) && (pt != last)); pt = pt->next_pt) {
         if (pt->ptoken_category == FIXED_WORD_PTC) {
             if ((word_count < base_text_word_count) &&
-                (Conjugation::compare_ve_with_tails(base_text_words[word_count], pt->ve_pt)))
+                (Conjugation::compare_ve_with_tails(base_text_words[word_count], pt->ve_pt)))
                 word_count++;
             else failed_to_match = TRUE;
         } else if (pt->ptoken_category == MULTIPLE_WILDCARD_PTC) {
@@ -451,13 +559,13 @@ infinitive" form is set to the part matched by         wildcard_from = 0;
     }
 
- -

§4.2. In a conjugation, productions have two possible forms: either just a single +

+

§8.2. In a conjugation, productions have two possible forms: either just a single nonterminal, which usually identifies the tabulation, or a number followed by some tokens.

-

Process the conjugation and determine the tabulation4.2 = +

Process the conjugation and determine the tabulation8.2 =

@@ -481,19 +589,19 @@ tokens.
                         } else malformed = TRUE;
                         break;
                     case 2:
-                        Set a verb form from the conjugation line4.2.1;
+                        Set a verb form from the conjugation line8.2.1;
                         break;
                     default: malformed = TRUE; break;
                 }
                 if (malformed)
-                    Conjugation::error(verb_forms[BASE_FORM_TYPE], conjugation_nt, pr,
+                    Conjugation::error(verb_forms[BASE_FORM_TYPE], conjugation_nt, pr,
                         "malformed line");
             }
         }
     }
 
-
  • This code is used in §4.
-

§4.2.1. So here we check the more interesting case. The number identifies which +

  • This code is used in §8.
+

§8.2.1. So here we check the more interesting case. The number identifies which verb form to set, and the token which follows it provides the content. For example:

@@ -503,28 +611,29 @@ example: 3 <en-trie-past-participle> run this trie on the base text and take the result

-

Set a verb form from the conjugation line4.2.1 = +

Set a verb form from the conjugation line8.2.1 =

     ptoken *number_token = pr->first_pt;
     ptoken *content_token = number_token->next_pt;
-    int n = Conjugation::ptoken_to_verb_form_number(number_token);
+    int n = Conjugation::ptoken_to_verb_form_number(number_token);
     if (n >= 0) {
         if (n > *highest_form_written) { *highest_form_written = n; }
         if (content_token->ptoken_category == NONTERMINAL_PTC)
             verb_forms[n] =
-                Inflections::apply_trie_to_wa(
+                Inflect::first_word(
                     verb_forms[BASE_FORM_TYPE],
-                    PreformUtilities::define_trie(content_token->nt_pt, TRIE_END, InflectionDefns::default_nl(nl)));
+                    PreformUtilities::define_trie(content_token->nt_pt,
+                        TRIE_END, DefaultLanguage::get(nl)));
         else if (content_token->ptoken_category == FIXED_WORD_PTC)
             verb_forms[n] =
-                Conjugation::expand_with_endings(content_token->ve_pt, verb_forms);
+                Conjugation::expand_with_endings(content_token->ve_pt, verb_forms);
         else malformed = TRUE;
     } else malformed = TRUE;
 
-
  • This code is used in §4.2.
-

§5. Merge verb material. Now the final main step. row points to a list of ptokens containing text, +

  • This code is used in §8.2.
+

§9. Merge verb material. Now the final main step. row points to a list of ptokens containing text, and we have to copy that text into a word assemblage and return it.

@@ -533,14 +642,14 @@ of special syntaxes which can go into the row of text. For example, if -
-    will not do
+
+    will not do
 

then the word assemblage comes out to just "will not do"; but if it is

-
-    ( t1 auxiliary-have ) done
+
+    ( t1 auxiliary-have ) done
 

then we consult tense 1 (present) of the verb "auxiliary-have", extract the relevant slot, then append "done". (This might produce "have done" @@ -553,7 +662,7 @@ a different verb's conjugation "lifting".

-word_assemblage Conjugation::merge(ptoken *row,
+word_assemblage Conjugation::merge(ptoken *row,
     int sense, int tense, int person, int num_ingredients, word_assemblage *ingredients,
     NATURAL_LANGUAGE_WORDS_TYPE *nl, int *modal_following) {
     if (modal_following) { *modal_following = 0; }
@@ -561,32 +670,33 @@ a different verb's conjugation "lifting".
     int verb_form_to_lift = -1;
     ptoken *chunk;
     for (chunk = row; chunk; chunk = chunk->next_pt) {
-        A plus-plus-digit indicates auxiliary modal usage5.5;
-        A form number followed by a bracketed verb lifts the relevant form5.3;
-        A bracketed verb becomes a lift5.4;
-        A fixed word is simply added to the result5.1;
-        A nonterminal is a table of persons5.2;
+        A plus-plus-digit indicates auxiliary modal usage9.5;
+        A form number followed by a bracketed verb lifts the relevant form9.3;
+        A bracketed verb becomes a lift9.4;
+        A fixed word is simply added to the result9.1;
+        A nonterminal is a table of persons9.2;
         internal_error("Error in merge material line");
     }
-    return Conjugation::shorten_with_contractions(wa);
+    return Conjugation::shorten_with_contractions(wa);
 }
 
-

§5.1. To take the easiest case first. If we read a word like trailing, we simply +

§9.1. To take the easiest case first. If we read a word like trailing, we simply add it. But note that Conjugation::expand_with_endings has other tricks up its sleeve, and might expand 3+ed to "trailed".

-

A fixed word is simply added to the result5.1 = +

A fixed word is simply added to the result9.1 =

     if (chunk->ptoken_category == FIXED_WORD_PTC) {
-        wa = WordAssemblages::join(wa, Conjugation::expand_with_endings(chunk->ve_pt, ingredients));
+        wa = WordAssemblages::join(wa,
+            Conjugation::expand_with_endings(chunk->ve_pt, ingredients));
         continue;
     }
 
-
  • This code is used in §5.
-

§5.2. If we read a nonterminal name, such as <fr-vivre-present>, then this must +

  • This code is used in §9.
+

§9.2. If we read a nonterminal name, such as <fr-vivre-present>, then this must be a grammar with six productions, giving the text to use for the six different persons. We consult person and extract the relevant text. For example, if person is 3, we extract "vivons". Note that this material is itself read @@ -594,7 +704,7 @@ in by a recursive use of Conj make use of the same fancy features we're allowing here.

-

A nonterminal is a table of persons5.2 = +

A nonterminal is a table of persons9.2 =

@@ -606,20 +716,20 @@ make use of the same fancy features we're allowing here.
             for (pr = pl->first_pr; pr; pr = pr->next_pr) {
                 if (N == person)
                     wa = WordAssemblages::join(wa,
-                        Conjugation::merge(pr->first_pt,
-                            sense, tense, person, num_ingredients, ingredients, nl, NULL));
+                        Conjugation::merge(pr->first_pt, sense, tense, person,
+                            num_ingredients, ingredients, nl, NULL));
                 N++;
             }
         }
         continue;
     }
 
-
  • This code is used in §5.
-

§5.3. A number followed by a verb in brackets, like so: +

  • This code is used in §9.
+

§9.3. A number followed by a verb in brackets, like so:

-
-    3 ( avoir )
+
+    3 ( avoir )
 

expands to verb form 3 of this verb — the past participle of "avoir", which is "eu", as it happens. This is a special kind of lift. It isn't actually @@ -627,77 +737,78 @@ performed now; we make a note and carry it out when we reach the brackets, on the next iteration.

-

A form number followed by a bracketed verb lifts the relevant form5.3 = +

A form number followed by a bracketed verb lifts the relevant form9.3 =

-    int X = Conjugation::ptoken_to_verb_form_number(chunk);
-    if ((X >= 0) && (Conjugation::ptoken_as_bracket(chunk->next_pt))) {
+    int X = Conjugation::ptoken_to_verb_form_number(chunk);
+    if ((X >= 0) && (Conjugation::ptoken_as_bracket(chunk->next_pt))) {
         verb_form_to_lift = X;
         continue;
     }
 
-
  • This code is used in §5.
-

§5.4. And now the lift takes place. We might at this point have verb_form_to_lift +

  • This code is used in §9.
+

§9.4. And now the lift takes place. We might at this point have verb_form_to_lift set, in which case we should lift a verb form, or we might not, in which case we should lift an ordinary usage, such as third-person singular in a particular tense. A lift can optionally change tense or sense: for example,

-
-    ( t1 have )
+
+    ( t1 have )
 

lifts from the present tense of "to have". If there's no tense indicator, the tense remains the current one. (It's also possible to change the sense from positive to negative or vice versa with this, though I can't think of a language where this would be useful.) Note that, once again, the text of the -infinitive passes through Conjugation::expand_with_endings, so that it can make use -of the numbered verb forms if we want it to. +infinitive passes through Conjugation::expand_with_endings, so that it can +make use of the numbered verb forms if we want it to.

-

A bracketed verb becomes a lift5.4 = +

A bracketed verb becomes a lift9.4 =

-    if (Conjugation::ptoken_as_bracket(chunk) == 1) {
+    if (Conjugation::ptoken_as_bracket(chunk) == 1) {
         chunk = chunk->next_pt;  move past open bracket
 
          if there is a tense/sense indicator, use it, and move forward
         int S = -1;
-        int T = Conjugation::ptoken_to_tense_indicator(chunk, &S) - 1;
+        int T = Conjugation::ptoken_to_tense_indicator(chunk, &S) - 1;
         if (T >= 0) chunk = chunk->next_pt; else T = tense;
         if (S == -1) S = sense;
 
          extract the text of the infinitive
         word_assemblage verb_lifted = WordAssemblages::lit_0();
-        while ((chunk) && (Conjugation::ptoken_as_bracket(chunk) != -1)) {
+        while ((chunk) && (Conjugation::ptoken_as_bracket(chunk) != -1)) {
             verb_lifted = WordAssemblages::join(verb_lifted,
-                Conjugation::expand_with_endings(chunk->ve_pt, ingredients));
+                Conjugation::expand_with_endings(chunk->ve_pt, ingredients));
             chunk = chunk->next_pt;
         }
 
-        verb_conjugation *aux = Conjugation::find_by_infinitive(verb_lifted);
-        if (aux == NULL) aux = Conjugation::conjugate(verb_lifted, nl);
+        verb_conjugation *aux = Conjugation::find_by_infinitive(verb_lifted);
+        if (aux == NULL) aux = Conjugation::conjugate(verb_lifted, nl);
         if (aux == NULL) internal_error("can't conjugate lifted verb");
         switch (verb_form_to_lift) {
             case 1: wa = WordAssemblages::join(wa, aux->infinitive); break;
             case 2: wa = WordAssemblages::join(wa, aux->present_participle); break;
             case 3: wa = WordAssemblages::join(wa, aux->past_participle); break;
-            case -1: wa = WordAssemblages::join(wa, aux->tabulations[ACTIVE_MOOD].vc_text[T][S][person]);
-                break;
+            case -1: wa = WordAssemblages::join(wa,
+                aux->tabulations[ACTIVE_MOOD].vc_text[T][S][person]); break;
             default: internal_error("only parts 1, 2, 3 can be extracted");
         }
         continue;
     }
 
-
  • This code is used in §5.
-

§5.5. A plus-plus-digit indicates auxiliary modal usage5.5 = +

  • This code is used in §9.
+

§9.5. A plus-plus-digit indicates auxiliary modal usage9.5 =

     if (chunk->ptoken_category == FIXED_WORD_PTC) {
         wchar_t *p = Vocabulary::get_exemplar(chunk->ve_pt, TRUE);
-        if ((p[0] == '+') && (p[1] == '+') && (Characters::isdigit(p[2])) && (p[3] == 0)) {
+        if ((p[0] == '+') && (p[1] == '+') && (Characters::isdigit(p[2])) &&
+            (p[3] == 0)) {
             if (modal_following) {
                 *modal_following = ((int) p[2]) - ((int) '0');
             }
@@ -705,8 +816,8 @@ of the numbered verb forms if we want it to.
         }
     }
 
-
  • This code is used in §5.
-

§6. Whenever we read a single word, it passes through the following. A word +

  • This code is used in §9.
+

§10. Whenever we read a single word, it passes through the following. A word like "fish" will pass through unchanged; a number like "7" will convert to verb form 7 in the current verb (for example, 2 becomes the present participle); a plus sign joins two pieces together; and a tilde is a tie, @@ -714,7 +825,8 @@ joining but with a space. Thus -word_assemblage Conjugation::expand_with_endings(vocabulary_entry *ve, word_assemblage *verb_forms) { +word_assemblage Conjugation::expand_with_endings(vocabulary_entry *ve, + word_assemblage *verb_forms) { if (ve == NULL) return WordAssemblages::lit_0(); wchar_t *p = Vocabulary::get_exemplar(ve, TRUE); @@ -725,8 +837,8 @@ joining but with a space. Thus Vocabulary::entry_for_partial_text(p, 0, i-1); vocabulary_entry *back = Vocabulary::entry_for_partial_text(p, i+1, Wide::len(p)-1); - word_assemblage front_wa = Conjugation::expand_with_endings(front, verb_forms); - word_assemblage back_wa = Conjugation::expand_with_endings(back, verb_forms); + word_assemblage front_wa = Conjugation::expand_with_endings(front, verb_forms); + word_assemblage back_wa = Conjugation::expand_with_endings(back, verb_forms); TEMPORARY_TEXT(TEMP); WRITE_TO(TEMP, "%A", &front_wa); if (p[i] == '~') PUT_TO(TEMP, ' '); @@ -736,45 +848,45 @@ joining but with a space. Thus return WordAssemblages::from_wording(W); } - int X = Conjugation::ve_to_verb_form_number(ve); + int X = Conjugation::ve_to_verb_form_number(ve); if (X >= 0) return verb_forms[X]; return WordAssemblages::lit_1(ve); }

-

§7. The final step in merging verb material is to pass the result through the +

§11. The final step in merging verb material is to pass the result through the following, which attends to contractions. (Most of the time it does nothing.) For example, suppose we have:

-
-    ne-' ai pas
+
+    ne-' ai pas
 
-

The -' marker tells us that the word it attaches to should contract if a +

The -' marker tells us that the word it attaches to should contract if a vowel follows it. In this case that's what happens, so we convert to:

-
-    n'ai pas
+
+    n'ai pas
 

On the other hand,

-
-    ne-' jette pas
+
+    ne-' jette pas
 

would convert to

-
-    ne jette pas
+
+    ne jette pas
 

with no contraction. Either way, though, we have to take some action when -we see a -' marker. +we see a -' marker.

-word_assemblage Conjugation::shorten_with_contractions(word_assemblage wa) {
+word_assemblage Conjugation::shorten_with_contractions(word_assemblage wa) {
     vocabulary_entry **words;
     int word_count;
     WordAssemblages::as_array(&wa, &words, &word_count);
@@ -786,7 +898,7 @@ we see a -' mar
         if ((j >= 0) && (p[j] == '-') && (p[j+1] == '\'')) {
             TEMPORARY_TEXT(TEMP);
             int contract_this = FALSE;
-            Decide whether a contraction is needed here7.1;
+            Decide whether a contraction is needed here11.1;
             if (contract_this) {
                 int k;
                 for (k=0; k<j-1; k++) { WRITE_TO(TEMP, "%c", p[k]); }
@@ -808,11 +920,11 @@ we see a -' mar
     return wa;
 }
 
-

§7.1. We contract if the following word starts with a (possibly accented) vowel, +

§11.1. We contract if the following word starts with a (possibly accented) vowel, and we construe "y" (but not "h" or "w") as a vowel.

-

Decide whether a contraction is needed here7.1 = +

Decide whether a contraction is needed here11.1 =

@@ -822,18 +934,18 @@ and we construe "y" (but not "h" or "w") as a vowel.
         (first == 'o') || (first == 'u') || (first == 'y'))
         contract_this = TRUE;
 
-
  • This code is used in §7.
-

§8. Parsing verb form numbers. These are easy: they're just written as arabic numbers. +

  • This code is used in §11.
+

§12. Parsing verb form numbers. These are easy: they're just written as arabic numbers.

-int Conjugation::ptoken_to_verb_form_number(ptoken *pt) {
+int Conjugation::ptoken_to_verb_form_number(ptoken *pt) {
     if ((pt) && (pt->ptoken_category == FIXED_WORD_PTC))
-        return Conjugation::ve_to_verb_form_number(pt->ve_pt);
+        return Conjugation::ve_to_verb_form_number(pt->ve_pt);
     return -1;
 }
 
-int Conjugation::ve_to_verb_form_number(vocabulary_entry *ve) {
+int Conjugation::ve_to_verb_form_number(vocabulary_entry *ve) {
     if (Vocabulary::test_vflags(ve, NUMBER_MC)) {
         int X = Vocabulary::get_literal_number_value(ve);
         if ((X >= 0) && (X < MAX_FORM_TYPES)) return X;
@@ -841,11 +953,11 @@ and we construe "y" (but not "h" or "w") as a vowel.
     return -1;
 }
 
-

§9. Parsing tense and sense indicators. These are a little harder: for example, t2+ or t3. +

§13. Parsing tense and sense indicators. These are a little harder: for example, t2+ or t3.

-int Conjugation::ptoken_to_tense_indicator(ptoken *pt, int *set_sense) {
+int Conjugation::ptoken_to_tense_indicator(ptoken *pt, int *set_sense) {
     if ((pt) && (pt->ptoken_category == FIXED_WORD_PTC)) {
         vocabulary_entry *ve = pt->ve_pt;
         wchar_t *p = Vocabulary::get_exemplar(ve, FALSE);
@@ -853,13 +965,15 @@ and we construe "y" (but not "h" or "w") as a vowel.
             int N = p[1] - '1' + 1;
             if ((N >= 1) && (N <= NO_KNOWN_TENSES)) return N;
         }
-        if ((p[0] == 't') && (Characters::isdigit(p[1])) && (p[2] == '+') && (p[3] == 0)) {
+        if ((p[0] == 't') && (Characters::isdigit(p[1])) &&
+            (p[2] == '+') && (p[3] == 0)) {
             int N = p[1] - '1' + 1;
             if ((N >= 1) && (N <= NO_KNOWN_TENSES)) {
                 *set_sense = 0; return N;
             }
         }
-        if ((p[0] == 't') && (Characters::isdigit(p[1])) && (p[2] == '-') && (p[3] == 0)) {
+        if ((p[0] == 't') && (Characters::isdigit(p[1])) &&
+            (p[2] == '-') && (p[3] == 0)) {
             int N = p[1] - '1' + 1;
             if ((N >= 1) && (N <= NO_KNOWN_TENSES)) {
                 *set_sense = 1; return N;
@@ -869,10 +983,10 @@ and we construe "y" (but not "h" or "w") as a vowel.
     return -1;
 }
 
-

§10. Parsing utilities.

+

§14. Parsing utilities.

-int Conjugation::ptoken_as_bracket(ptoken *pt) {
+int Conjugation::ptoken_as_bracket(ptoken *pt) {
     if ((pt) && (pt->ptoken_category == FIXED_WORD_PTC)) {
         vocabulary_entry *ve = pt->ve_pt;
         if (ve == OPENBRACKET_V) return 1;
@@ -881,12 +995,12 @@ and we construe "y" (but not "h" or "w") as a vowel.
     return 0;
 }
 
-

§11. In the following, for example, "breveter" as ve would match "-veter" +

§15. In the following, for example, "breveter" as ve would match "-veter" as pattern.

-int Conjugation::compare_ve_with_tails(vocabulary_entry *ve, vocabulary_entry *pattern) {
+int Conjugation::compare_ve_with_tails(vocabulary_entry *ve, vocabulary_entry *pattern) {
     if (ve == pattern) return TRUE;
     wchar_t *p = Vocabulary::get_exemplar(pattern, FALSE);
     if (p[0] == '-') {
@@ -900,16 +1014,16 @@ as pattern.
     return FALSE;
 }
 
-

§12. Errors.

+

§16. Errors.

-void Conjugation::error(word_assemblage base_text, nonterminal *nt,
+void Conjugation::error(word_assemblage base_text, nonterminal *nt,
     production *pr, char *message) {
     PreformUtilities::error(base_text, nt, pr, message);
     exit(1);
 }
 
-

§13. Testing. Similarly, the following helps translators by giving them unit tests for their +

§17. Testing. Similarly, the following helps translators by giving them unit tests for their conjugations:

@@ -919,86 +1033,23 @@ conjugations:
 void Conjugation::test(OUTPUT_STREAM, wording W, NATURAL_LANGUAGE_WORDS_TYPE *nl) {
-    verb_conjugation *vc = Conjugation::conjugate(
+    verb_conjugation *vc = Conjugation::conjugate(
         WordAssemblages::from_wording(W), nl);
     if (vc == NULL) { WRITE("Failed test\n"); return; }
-    Conjugation::write(OUT, vc);
+    Conjugation::write(OUT, vc);
     DESTROY(vc, verb_conjugation);
 }
-
-void Conjugation::write(OUTPUT_STREAM, verb_conjugation *vc) {
-    WRITE("Infinitive: %A / Present participle: %A / Past participle: %A^",
-        &(vc->infinitive), &(vc->present_participle), &(vc->past_participle));
-    int mood_count = 2;
-    if (WordAssemblages::nonempty(vc->tabulations[PASSIVE_MOOD].to_be_auxiliary)) mood_count = 1;
-    int mood, sense, tense, person;
-    for (mood=0; mood<mood_count; mood++) {
-        for (sense=0; sense<2; sense++) {
-            if (mood == 0) WRITE("Active "); else WRITE("Passive ");
-            if (sense == 0) WRITE("positive^"); else WRITE("negative^");
-            for (tense=0; tense<7; tense++) {
-                WRITE("Tense %d: ", tense);
-                for (person=0; person<6; person++) {
-                    word_assemblage *wa;
-                    if (mood == 0) wa = &(vc->tabulations[ACTIVE_MOOD].vc_text[tense][sense][person]);
-                    else wa = &(vc->tabulations[PASSIVE_MOOD].vc_text[tense][sense][person]);
-                    if (person > 0) WRITE(" / ");
-                    if (WordAssemblages::nonempty(*wa)) WRITE("%A", wa);
-                    else WRITE("--");
-                }
-                WRITE("^");
-            }
-        }
-    }
-    if (WordAssemblages::nonempty(vc->tabulations[PASSIVE_MOOD].to_be_auxiliary))
-        WRITE("Form passive as to be + %A\n", &(vc->tabulations[PASSIVE_MOOD].to_be_auxiliary));
-}
-
-verb_conjugation *Conjugation::find_by_infinitive(word_assemblage infinitive) {
-    verb_conjugation *vc;
-    LOOP_OVER(vc, verb_conjugation)
-        if (WordAssemblages::compare(&infinitive, &(vc->infinitive)))
-            return vc;
-    return NULL;
-}
-
-verb_conjugation *Conjugation::find_prior(verb_conjugation *nvc) {
-    if (nvc == NULL) return NULL;
-    verb_conjugation *vc;
-    LOOP_OVER(vc, verb_conjugation) {
-        if (vc != nvc) {
-            if (WordAssemblages::compare(&(nvc->infinitive), &(vc->infinitive)) == FALSE) continue;
-            if (WordAssemblages::compare(&(nvc->past_participle), &(vc->past_participle)) == FALSE) continue;
-            if (WordAssemblages::compare(&(nvc->present_participle), &(vc->present_participle)) == FALSE) continue;
-            int match = TRUE;
-            for (int i=0; i<NO_KNOWN_MOODS; i++) {
-                verb_tabulation *nvt = &(nvc->tabulations[i]);
-                verb_tabulation *vt = &(vc->tabulations[i]);
-                if (WordAssemblages::compare(&(nvt->to_be_auxiliary), &(vt->to_be_auxiliary)) == FALSE) match = FALSE;
-                for (int p=0; p<6; p++)
-                    for (int s=0; s<2; s++)
-                        for (int t=0; t<NO_KNOWN_TENSES; t++) {
-                            if (WordAssemblages::compare(&(nvt->vc_text[t][s][p]), &(vt->vc_text[t][s][p])) == FALSE) match = FALSE;
-                            if (nvt->modal_auxiliary_usage[t][s][p] != vt->modal_auxiliary_usage[t][s][p]) match = FALSE;
-                        }
-            }
-            if (match == FALSE) continue;
-            return vc;
-        }
-    }
-    return NULL;
-}
 
-

§14. This is for testing English only; it helps with the test suite cases derived +

§18. This is for testing English only; it helps with the test suite cases derived from our dictionary of 14,000 or so present and past participles.

 void Conjugation::test_participle(OUTPUT_STREAM, wording W) {
-    verb_conjugation *vc = Conjugation::conjugate(
-        WordAssemblages::from_wording(W), InflectionDefns::default_nl(NULL));
+    verb_conjugation *vc = Conjugation::conjugate(
+        WordAssemblages::from_wording(W), DefaultLanguage::get(NULL));
     if (vc == NULL) { WRITE("Failed test\n"); return; }
-    Conjugation::write_participle(OUT, vc);
+    Conjugation::write_participle(OUT, vc);
     DESTROY(vc, verb_conjugation);
 }
 
@@ -1007,7 +1058,7 @@ from our dictionary of 14,000 or so present and past participles.
         &(vc->infinitive), &(vc->present_participle), &(vc->past_participle));
 }
 
-

§15. As noted above, these nonterminals have no parsing function, and are used only +

§19. As noted above, these nonterminals have no parsing function, and are used only as markers in verb conjugations.

@@ -1022,7 +1073,7 @@ as markers in verb conjugations.
diff --git a/docs/inflections-module/4-dl.html b/docs/inflections-module/4-dl.html new file mode 100644 index 000000000..a7ad071be --- /dev/null +++ b/docs/inflections-module/4-dl.html @@ -0,0 +1,91 @@ + + + + Default Language + + + + + + + + + + + + + + + + + + +
+ + +

To keep track of what the default natural language is.

+ +

§1. The following mechanism may become more sophisticated later. +

+ +
+NATURAL_LANGUAGE_WORDS_TYPE *default_language_for_linguistics = NULL;
+
+void DefaultLanguage::set(NATURAL_LANGUAGE_WORDS_TYPE *nl) {
+    default_language_for_linguistics = nl;
+}
+
+NATURAL_LANGUAGE_WORDS_TYPE *DefaultLanguage::get(NATURAL_LANGUAGE_WORDS_TYPE *nl) {
+    if (nl) return nl;
+    return default_language_for_linguistics;
+}
+
+ + +
+ + + diff --git a/docs/inflections-module/4-ei.html b/docs/inflections-module/4-ei.html index ea5e68b7b..0de23807d 100644 --- a/docs/inflections-module/4-ei.html +++ b/docs/inflections-module/4-ei.html @@ -56,7 +56,7 @@
+

To define how English nouns and verbs are inflected.


@@ -83,12 +83,12 @@ dictionary and the "Official Scrabble Wordlist".
 <en-trie-indef-a> ::=
-    oneir*			an |
-    onero*			an |
-    ukiyo-e			an | 		 Japanese style of 17th-19th cent. printmaking
-    urao*			an |
-    urial*			an |
-    uvarovite*		an 			 a rare emerald-green garnet, Ca3Cr2(SiO4)3
+    oneir*          an |
+    onero*          an |
+    ukiyo-e         an |          Japanese style of 17th-19th cent. printmaking
+    urao*           an |
+    urial*          an |
+    uvarovite*      an            a rare emerald-green garnet, Ca3Cr2(SiO4)3
 

§3. Then the exceptions: @@ -96,69 +96,69 @@ dictionary and the "Official Scrabble Wordlist".

 <en-trie-indef-b> ::=
-    eu*				a | 		 e.g., euphoria, eulogy
-    ewe*			a | 		 female sheep
-    ewftes			a | 		 Spens. form of an eft lizard
-    ewghen			a | 		 made of yew, i.e., yewen
-    ewk				a |
-    houri			a |
-    once*			a | 		 a Once and Future King
-    one*			a | 		 but still use an for oneir- and onero-
-    onst			a | 		 dialect form of once
-    oui*			a | 		 e.g., a Ouija board or a ouistiti (a marmoset)
-    u				a | 		 the letter U
-    u-*				a | 		 e.g., U-boats
-    u'*				a | 		 e.g., u's
-    uakari			a | 		 the South American monkey
-    ub*				a | 		 e.g., ubiquitous
-    udal*			a |
-    udomet*			a |
-    uey				a | 		 colloquial for "U-turn", as in "he pulled a uey"
-    ueys			a |
-    ufo*			a |
-    uganda*			a | 		 the county Uganda
-    ugr*			a |
-    uint*			a |
-    uk*				a |
-    ulex			a | 		 the genus of gorse
-    uli*			a |
-    ulo*			a |
-    ulu*			a |
-    una				a | 		 from "una corda", the musical term
-    unabomb*		a | 		 the so-called Unabomber
-    unalist			a |
-    unanimit*		a |
-    unanimous*		a |
-    unesco			a | 		 the United Nations cultural body
-    unescos			a |
-    unia*			a |
-    unic*			a |
-    unif*			a |
-    unig*			a |
-    unil*			a |
-    unio*			a |
-    unip*			a |
-    uniq*			a |
-    unis*			a |
-    unit*			a |
-    univ*			a |
-    upas*			a |
-    ura*			a |
-    ure*			a |
-    uri*			a |
-    uru*			a |
-    usa*			a |
-    use*			a |
-    usi*			a |
-    usu*			a |
-    utas*			a |
-    ute*			a |
-    uti*			a |
-    uto*			a |
-    utr*			a |
-    uttoxeter*		a | 		 the English town of Uttoxeter
-    uva*			a |
-    uvu*			a
+    eu*             a |          e.g., euphoria, eulogy
+    ewe*            a |          female sheep
+    ewftes          a |          Spens. form of an eft lizard
+    ewghen          a |          made of yew, i.e., yewen
+    ewk             a |
+    houri           a |
+    once*           a |          a Once and Future King
+    one*            a |          but still use an for oneir- and onero-
+    onst            a |          dialect form of once
+    oui*            a |          e.g., a Ouija board or a ouistiti (a marmoset)
+    u               a |          the letter U
+    u-*             a |          e.g., U-boats
+    u'*             a |          e.g., u's
+    uakari          a |          the South American monkey
+    ub*             a |          e.g., ubiquitous
+    udal*           a |
+    udomet*         a |
+    uey             a |          colloquial for "U-turn", as in "he pulled a uey"
+    ueys            a |
+    ufo*            a |
+    uganda*         a |          the country Uganda
+    ugr*            a |
+    uint*           a |
+    uk*             a |
+    ulex            a |          the genus of gorse
+    uli*            a |
+    ulo*            a |
+    ulu*            a |
+    una             a |          from "una corda", the musical term
+    unabomb*        a |          the so-called Unabomber
+    unalist         a |
+    unanimit*       a |
+    unanimous*      a |
+    unesco          a |          the United Nations cultural body
+    unescos         a |
+    unia*           a |
+    unic*           a |
+    unif*           a |
+    unig*           a |
+    unil*           a |
+    unio*           a |
+    unip*           a |
+    uniq*           a |
+    unis*           a |
+    unit*           a |
+    univ*           a |
+    upas*           a |
+    ura*            a |
+    ure*            a |
+    uri*            a |
+    uru*            a |
+    usa*            a |
+    use*            a |
+    usi*            a |
+    usu*            a |
+    utas*           a |
+    ute*            a |
+    uti*            a |
+    uto*            a |
+    utr*            a |
+    uttoxeter*      a |          the English town of Uttoxeter
+    uva*            a |
+    uvu*            a
 

§4. And finally the basic rules: @@ -166,59 +166,59 @@ dictionary and the "Official Scrabble Wordlist".

 <en-trie-indef-c> ::=
-    a*				an |
-    e*				an |
-    i*				an |
-    o*				an |
-    u*				an |
-    f				an |
-    f's				an |
-    f-*				an |
-    fbi				an |
-    fo				an |
-    frs				an |
-    h				an |
-    h's				an |
-    h-*				an | 		 e.g., H-bomb
-    haute*			an | 		 e.g., haute cuisine, hauteur
-    heir*			an |
-    hono*			an | 		 e.g., honorific, honorary doctorate
-    hour*			an |
-    l				an |
-    l's				an |
-    l-*				an | 		 e.g., L-plate
-    m				an |
-    m's				an |
-    m-*				an | 		 e.g., M-ration
-    n				an |
-    n's				an |
-    n-*				an | 		 e.g., N-dimensional manifold
-    r				an |
-    r's				an |
-    r-*				an |
-    rac				an | 		 Royal Automobile Club
-    raf				an | 		 Royal Air Force
-    rspca			an | 		 Royal Society for the Prevention of Cruelty to Animals
-    rsvp			an |
-    s				an |
-    s's				an |
-    s-*				an |
-    x				an |
-    x's				an |
-    x-*				an | 		 e.g., X-ray
-    xmas*			an |
-    yb*				an | 		 these are mostly obs., Spens., and/or arch.
-    yc*				an |
-    yd*				an |
-    yf*				an |
-    yg*				an |
-    ym*				an |
-    yn*				an |
-    yp*				an | 		 e.g., ypsilon
-    yr*				an |
-    ys*				an |
-    yt*				an | 		 e.g., Ytterbium, Yttrium
-    yw*				an
+    a*              an |
+    e*              an |
+    i*              an |
+    o*              an |
+    u*              an |
+    f               an |
+    f's             an |
+    f-*             an |
+    fbi             an |
+    fo              an |
+    frs             an |
+    h               an |
+    h's             an |
+    h-*             an |          e.g., H-bomb
+    haute*          an |          e.g., haute cuisine, hauteur
+    heir*           an |
+    hono*           an |          e.g., honorific, honorary doctorate
+    hour*           an |
+    l               an |
+    l's             an |
+    l-*             an |          e.g., L-plate
+    m               an |
+    m's             an |
+    m-*             an |          e.g., M-ration
+    n               an |
+    n's             an |
+    n-*             an |          e.g., N-dimensional manifold
+    r               an |
+    r's             an |
+    r-*             an |
+    rac             an |          Royal Automobile Club
+    raf             an |          Royal Air Force
+    rspca           an |          Royal Society for the Prevention of Cruelty to Animals
+    rsvp            an |
+    s               an |
+    s's             an |
+    s-*             an |
+    x               an |
+    x's             an |
+    x-*             an |          e.g., X-ray
+    xmas*           an |
+    yb*             an |          these are mostly obs., Spens., and/or arch.
+    yc*             an |
+    yd*             an |
+    yf*             an |
+    yg*             an |
+    ym*             an |
+    yn*             an |
+    yp*             an |          e.g., ypsilon
+    yr*             an |
+    ys*             an |
+    yt*             an |          e.g., Ytterbium, Yttrium
+    yw*             an
 

§5. Plural inflections. The following takes a single word, assumes it to be a noun which meaningfully @@ -273,56 +273,56 @@ have the same plural as singular form: for example, chamois, salmon, goldfish.

 <en-trie-plural-uninflected> ::=
-    *fish			0 |
-    *ois			0 |
-    *sheep			0 |
-    *deer			0 |
-    *pox			0 |
-    *itis			0 |
-    bison			0 |
-    flounder		0 |
-    pliers			0 |
-    bream			0 |
-    gallows			0 |
-    proceedings		0 |
-    breeches		0 |
-    graffiti		0 |
-    rabies			0 |
-    britches		0 |
-    headquarters	0 |
-    salmon			0 |
-    carp			0 |
-    herpes			0 |
-    scissors		0 |
-    chassis			0 |
-    high-jinks		0 |
-    sea-bass		0 |
-    clippers		0 |
-    homework		0 |
-    series			0 |
-    cod				0 |
-    innings			0 |
-    shears			0 |
-    contretemps		0 |
-    jackanapes		0 |
-    species			0 |
-    corps			0 |
-    mackerel		0 |
-    swine			0 |
-    debris			0 |
-    measles			0 |
-    trout			0 |
-    diabetes		0 |
-    mews			0 |
-    tuna			0 |
-    djinn			0 |
-    mumps			0 |
-    whiting			0 |
-    eland			0 |
-    news			0 |
-    wildebeest		0 |
-    elk				0 |
-    pincers			0
+    *fish           0 |
+    *ois            0 |
+    *sheep          0 |
+    *deer           0 |
+    *pox            0 |
+    *itis           0 |
+    bison           0 |
+    flounder        0 |
+    pliers          0 |
+    bream           0 |
+    gallows         0 |
+    proceedings     0 |
+    breeches        0 |
+    graffiti        0 |
+    rabies          0 |
+    britches        0 |
+    headquarters    0 |
+    salmon          0 |
+    carp            0 |
+    herpes          0 |
+    scissors        0 |
+    chassis         0 |
+    high-jinks      0 |
+    sea-bass        0 |
+    clippers        0 |
+    homework        0 |
+    series          0 |
+    cod             0 |
+    innings         0 |
+    shears          0 |
+    contretemps     0 |
+    jackanapes      0 |
+    species         0 |
+    corps           0 |
+    mackerel        0 |
+    swine           0 |
+    debris          0 |
+    measles         0 |
+    trout           0 |
+    diabetes        0 |
+    mews            0 |
+    tuna            0 |
+    djinn           0 |
+    mumps           0 |
+    whiting         0 |
+    eland           0 |
+    news            0 |
+    wildebeest      0 |
+    elk             0 |
+    pincers         0
 

§7. We may as well pluralise pronouns while we're at it. @@ -330,28 +330,28 @@ have the same plural as singular form: for example, chamois, salmon, goldfish.

 <en-trie-plural-pronouns> ::=
-    i				we |
-    you				you |
-    thou			you |
-    she				they |
-    he				they |
-    it				they |
-    they			they |
-    me				us |
-    you				you |
-    thee			you |
-    her				them |
-    him				them |
-    it				them |
-    them			them |
-    myself			ourselves |
-    yourself		yourself |
-    thyself			yourself |
-    herself			themselves |
-    himself			themselves |
-    itself			themselves |
-    themself		themselves |
-    oneself			oneselves
+    i               we |
+    you             you |
+    thou            you |
+    she             they |
+    he              they |
+    it              they |
+    they            they |
+    me              us |
+    you             you |
+    thee            you |
+    her             them |
+    him             them |
+    it              them |
+    them            them |
+    myself          ourselves |
+    yourself        yourself |
+    thyself         yourself |
+    herself         themselves |
+    himself         themselves |
+    itself          themselves |
+    themself        themselves |
+    oneself         oneselves
 

§8. We now reach Conway step 4. These are irregular plurals mostly coming @@ -360,19 +360,19 @@ from archaisms.

 <en-trie-plural-irregular> ::=
-    beef			beefs |			 we neglect the classical "beeves"
-    brother			brothers |		 and "brethren"
-    child			children |
-    cow				cows |			 and "kine"
-    ephemeris		ephemerides |
-    genie			genies |		 and "genii"
-    money			moneys |		 and "monies"
-    mongoose		mongooses |
-    mythos			mythoi |
-    octopus			octopuses | 	 and "octopodes"
-    ox				oxen |
-    soliloquy		soliloquies |
-    trilby			trilbys
+    beef            beefs |             we neglect the classical "beeves"
+    brother         brothers |       and "brethren"
+    child           children |
+    cow             cows |             and "kine"
+    ephemeris       ephemerides |
+    genie           genies |         and "genii"
+    money           moneys |         and "monies"
+    mongoose        mongooses |
+    mythos          mythoi |
+    octopus         octopuses |      and "octopodes"
+    ox              oxen |
+    soliloquy       soliloquies |
+    trilby          trilbys
 

§9. Step 5. Now we reach a batch of irregular but fairly general inflected @@ -382,17 +382,17 @@ Note that we differ from Conway in pluralizing blouse as blouses, not blice.

 <en-trie-plural-irregular-inflections> ::=
-    *man			3men |			 Step 5 begins here
-    *blouse			2ses |
-    *louse			5lice |
-    *mouse			5mice |
-    *tooth			5teeth |
-    *goose			5geese |
-    *foot			4feet |
-    *zoon			4zoa |
-    *cis			3ces |
-    *sis			3ses |
-    *xis			3xes
+    *man            3men |             Step 5 begins here
+    *blouse         2ses |
+    *louse          5lice |
+    *mouse          5mice |
+    *tooth          5teeth |
+    *goose          5geese |
+    *foot           4feet |
+    *zoon           4zoa |
+    *cis            3ces |
+    *sis            3ses |
+    *xis            3xes
 

§10. Step 6. These are inflections from Latin and Greek which have survived @@ -401,30 +401,30 @@ into modern English:

 <en-trie-plural-assimilated-classical-inflections> ::=
-    alumna			alumnae |			 from table A.10
-    alga			algae |
-    vertebra		vertebrae |
-    codex			codices |			 from table A.14
-    murex			murices |
-    silex			silices |
-    aphelion		aphelia |			 from table A.19
-    hyperbaton		hyperbata |
-    perihelion		perihelia |
-    asyndeton		asyndeta |
-    noumenon		noumena |
-    phenomenon		phenomena |
-    criterion		criteria |
-    organon			organa |
-    prolegomenon	prolegomena |
-    agendum			agenda |			 from table A.20
-    datum			data |
-    extremum		extrema |
-    bacterium		bacteria |
-    desideratum		desiderata |
-    stratum			strata |
-    candelabrum		candelabra |
-    erratum			errata |
-    ovum			ova
+    alumna          alumnae |             from table A.10
+    alga            algae |
+    vertebra        vertebrae |
+    codex           codices |             from table A.14
+    murex           murices |
+    silex           silices |
+    aphelion        aphelia |             from table A.19
+    hyperbaton      hyperbata |
+    perihelion      perihelia |
+    asyndeton       asyndeta |
+    noumenon        noumena |
+    phenomenon      phenomena |
+    criterion       criteria |
+    organon         organa |
+    prolegomenon    prolegomena |
+    agendum         agenda |             from table A.20
+    datum           data |
+    extremum        extrema |
+    bacterium       bacteria |
+    desideratum     desiderata |
+    stratum         strata |
+    candelabrum     candelabra |
+    erratum         errata |
+    ovum            ova
 

§11. Step 11a. (We're not implementing Conway's steps in sequence: see below.) @@ -434,38 +434,38 @@ inflections are assimilated.

 <en-trie-plural-irregular-o-suffixes> ::=
-    albino			albinos |
-    alto			altos |
-    archipelago		archipelagos |
-    armadillo		armadillos |
-    basso			bassos |
-    canto			cantos |
-    commando		commandos |
-    contralto		contraltos |
-    crescendo		crescendos |
-    ditto			dittos |
-    dynamo			dynamos |
-    embryo			embryos |
-    fiasco			fiascos |
-    generalissimo	generalissimos |
-    ghetto			ghettos |
-    guano			guanos |
-    inferno			infernos |
-    jumbo			jumbos |
-    lingo			lingos |
-    lumbago			lumbagos |
-    magneto			magnetos |
-    manifesto		manifestos |
-    medico			medicos |
-    octavo			octavos |
-    photo			photos |
-    pro				pros |
-    quarto			quartos |
-    rhino			rhinos |
-    solo			solos |
-    soprano			sopranos |
-    stylo			stylos |
-    tempo			tempos
+    albino          albinos |
+    alto            altos |
+    archipelago     archipelagos |
+    armadillo       armadillos |
+    basso           bassos |
+    canto           cantos |
+    commando        commandos |
+    contralto       contraltos |
+    crescendo       crescendos |
+    ditto           dittos |
+    dynamo          dynamos |
+    embryo          embryos |
+    fiasco          fiascos |
+    generalissimo   generalissimos |
+    ghetto          ghettos |
+    guano           guanos |
+    inferno         infernos |
+    jumbo           jumbos |
+    lingo           lingos |
+    lumbago         lumbagos |
+    magneto         magnetos |
+    manifesto       manifestos |
+    medico          medicos |
+    octavo          octavos |
+    photo           photos |
+    pro             pros |
+    quarto          quartos |
+    rhino           rhinos |
+    solo            solos |
+    soprano         sopranos |
+    stylo           stylos |
+    tempo           tempos
 

§12. Conway steps 8 to 11. These are regular inflections depending only on @@ -474,84 +474,84 @@ word endings.

 <en-trie-plural-regular-inflections> ::=
-    *ch				0es | 		 Step 8: "church" to "churches"
-    *sh				0es | 		 "rush" to "rushes"
-    *ss				0es | 		 "dress" to "dresses"
-    *alf			1ves | 		 Step 9: "calf" to "calves"
-    *elf			1ves | 		 "self" to "selves"
-    *olf			1ves | 		 "wolf" to "wolves"
-    *eaf			1ves | 		 "sheaf" to "sheaves"
-    *arf			1ves | 		 "wharf" to "wharves"
-    *nife			2ves | 		 "knife" to "knives"
-    *life			2ves | 		 "life" to "lives"
-    *wife			2ves | 		 "wife" to "wives"
-    *ax				0es | 		 Sibilant additions: "fax" to "faxes"
-    *ex				0es | 		 "sex" to "sexes"
-    *ix				0es | 		 "Weetabix" to "Weetabixes"
-    *ox				0es | 		 "fox" to "foxes"
-    *ux				0es | 		 "flux" to "fluxes"
-    *as				0es | 		 "gas" to "gases"
-    *es				0es |
-    *is				0es | 		 "mantis" to "mantises"
-    *os				0es | 		 "thermos" to "thermoses"
-    *us				0es | 		 "abacus" to "abacuses"
-    *az				0es |
-    *ez				0es | 		 "fez" to "fezes"
-    *iz				0es |
-    *oz				0es |
-    *uz				0es |
-    *ay				0s |			 Step 10 begins here
-    *by				1ies |
-    *cy				1ies |
-    *dy				1ies |
-    *ey				0s |
-    *fy				1ies |
-    *gy				1ies |
-    *hy				1ies |
-    *iy				0s |
-    *jy				1ies |
-    *ky				1ies |
-    *ly				1ies |
-    *my				1ies |
-    *ny				1ies |
-    *oy				0s |
-    *py				1ies |
-    *qy				1ies |
-    *ry				1ies |
-    *sy				1ies |
-    *ty				1ies |
-    *uy				0s |
-    *vy				1ies |
-    *wy				1ies |
-    *xy				1ies |
-    *yy				1ies |
-    *zy				1ies |
-    *ao				0s |			 Step 11b begins here
-    *bo				1oes |
-    *co				1oes |
-    *do				1oes |
-    *eo				0s |
-    *fo				1oes |
-    *go				1oes |
-    *ho				1oes |
-    *io				0s |
-    *jo				1oes |
-    *ko				1oes |
-    *lo				1oes |
-    *mo				1oes |
-    *no				1oes |
-    *oo				0s |
-    *po				1oes |
-    *qo				1oes |
-    *ro				1oes |
-    *so				0s |
-    *to				1oes |
-    *uo				0s |
-    *vo				1oes |
-    *wo				1oes |
-    *xo				0s |
-    *yo				1oes |
-    *zo				0s
+    *ch             0es |          Step 8: "church" to "churches"
+    *sh             0es |          "rush" to "rushes"
+    *ss             0es |          "dress" to "dresses"
+    *alf            1ves |          Step 9: "calf" to "calves"
+    *elf            1ves |          "self" to "selves"
+    *olf            1ves |          "wolf" to "wolves"
+    *eaf            1ves |          "sheaf" to "sheaves"
+    *arf            1ves |          "wharf" to "wharves"
+    *nife           2ves |          "knife" to "knives"
+    *life           2ves |          "life" to "lives"
+    *wife           2ves |          "wife" to "wives"
+    *ax             0es |          Sibilant additions: "fax" to "faxes"
+    *ex             0es |          "sex" to "sexes"
+    *ix             0es |          "Weetabix" to "Weetabixes"
+    *ox             0es |          "fox" to "foxes"
+    *ux             0es |          "flux" to "fluxes"
+    *as             0es |          "gas" to "gases"
+    *es             0es |
+    *is             0es |          "mantis" to "mantises"
+    *os             0es |          "thermos" to "thermoses"
+    *us             0es |          "abacus" to "abacuses"
+    *az             0es |
+    *ez             0es |          "fez" to "fezes"
+    *iz             0es |
+    *oz             0es |
+    *uz             0es |
+    *ay             0s |             Step 10 begins here
+    *by             1ies |
+    *cy             1ies |
+    *dy             1ies |
+    *ey             0s |
+    *fy             1ies |
+    *gy             1ies |
+    *hy             1ies |
+    *iy             0s |
+    *jy             1ies |
+    *ky             1ies |
+    *ly             1ies |
+    *my             1ies |
+    *ny             1ies |
+    *oy             0s |
+    *py             1ies |
+    *qy             1ies |
+    *ry             1ies |
+    *sy             1ies |
+    *ty             1ies |
+    *uy             0s |
+    *vy             1ies |
+    *wy             1ies |
+    *xy             1ies |
+    *yy             1ies |
+    *zy             1ies |
+    *ao             0s |             Step 11b begins here
+    *bo             1oes |
+    *co             1oes |
+    *do             1oes |
+    *eo             0s |
+    *fo             1oes |
+    *go             1oes |
+    *ho             1oes |
+    *io             0s |
+    *jo             1oes |
+    *ko             1oes |
+    *lo             1oes |
+    *mo             1oes |
+    *no             1oes |
+    *oo             0s |
+    *po             1oes |
+    *qo             1oes |
+    *ro             1oes |
+    *so             0s |
+    *to             1oes |
+    *uo             0s |
+    *vo             1oes |
+    *wo             1oes |
+    *xo             0s |
+    *yo             1oes |
+    *zo             0s
 

§13. Lastly, the fallback if none of the above cases match: append an -s, of @@ -560,7 +560,7 @@ course.

 <en-trie-plural-append-s> ::=
-    *				0s				 Step 13
+    *               0s                 Step 13
 

§14. Verb inflections. "Le verbe est l'âme d'une langue" (attributed to Georges Duhamel). And the @@ -694,31 +694,31 @@ Inform assertion sentences, but are needed for text substitutions.)

 <verb-conjugation-instructions> ::=
-    be 					<to-be-conjugation> |
-    be able to ... 		<to-be-able-to-auxiliary> |
-    be able to			<to-be-able-to-conjugation> |
-    could				<modal-conjugation> |
-    may					<modal-conjugation> |
-    might				<modal-conjugation> |
-    must				<modal-conjugation> |
-    should				<modal-conjugation> |
-    would				<modal-conjugation> |
-    auxiliary-have 		<to-have-conjugation> |
-    do 					<to-do-conjugation> |
-    're 				<contracted-to-be-conjugation> |
-    've 				<contracted-to-have-conjugation> |
-    aren't 				<arent-conjugation> |
-    can't 				<cant-modal-conjugation> |
-    don't 				<informal-negated-modal-conjugation> |
-    haven't 			<informal-negated-modal-conjugation> |
-    mayn't 				<informal-negated-modal-conjugation> |
-    mightn't 			<informal-negated-modal-conjugation> |
-    mustn't 			<informal-negated-modal-conjugation> |
-    wouldn't 			<informal-negated-modal-conjugation> |
-    couldn't 			<informal-negated-modal-conjugation> |
-    shouldn't 			<informal-negated-modal-conjugation> |
-    won't 				<informal-negated-modal-conjugation> |
-    ... 				<regular-verb-conjugation>
+    be              <to-be-conjugation> |
+    be able to ...  <to-be-able-to-auxiliary> |
+    be able to      <to-be-able-to-conjugation> |
+    could           <modal-conjugation> |
+    may             <modal-conjugation> |
+    might           <modal-conjugation> |
+    must            <modal-conjugation> |
+    should          <modal-conjugation> |
+    would           <modal-conjugation> |
+    auxiliary-have  <to-have-conjugation> |
+    do              <to-do-conjugation> |
+    're             <contracted-to-be-conjugation> |
+    've             <contracted-to-have-conjugation> |
+    aren't          <arent-conjugation> |
+    can't           <cant-modal-conjugation> |
+    don't           <informal-negated-modal-conjugation> |
+    haven't         <informal-negated-modal-conjugation> |
+    mayn't          <informal-negated-modal-conjugation> |
+    mightn't        <informal-negated-modal-conjugation> |
+    mustn't         <informal-negated-modal-conjugation> |
+    wouldn't        <informal-negated-modal-conjugation> |
+    couldn't        <informal-negated-modal-conjugation> |
+    shouldn't       <informal-negated-modal-conjugation> |
+    won't           <informal-negated-modal-conjugation> |
+    ...             <regular-verb-conjugation>
 

§19. We will start with two auxiliary verbs, that is, verbs used to construct @@ -917,10 +917,10 @@ are used for the six persons.

 <to-have-tabulation> ::=
-    a1+		<to-have-present> |
-    a1-		<to-have-present> not |
-    a2+		had |
-    a2-		had not
+    a1+        <to-have-present> |
+    a1-        <to-have-present> not |
+    a2+        had |
+    a2-        had not
 

§21. And this is an example of splitting into cases for the six persons, @@ -980,20 +980,20 @@ may have to revisit this for languages other than English.)

 <to-do-conjugation> ::=
-    2 		doing |
-    3 		done |
+    2         doing |
+    3         done |
     <to-do-tabulation>
 
 <to-do-tabulation> ::=
-    a1+		<to-do-present> |
-    a1-		<to-do-present> not |
-    a2+		did |
-    a2-		did not |
-    a3		( t1 auxiliary-have ) done |
-    a4		( t2 auxiliary-have ) done |
-    a5+		will do |
-    a5-		will not do |
-    p*		done by
+    a1+       <to-do-present> |
+    a1-       <to-do-present> not |
+    a2+       did |
+    a2-       did not |
+    a3        ( t1 auxiliary-have ) done |
+    a4        ( t2 auxiliary-have ) done |
+    a5+       will do |
+    a5-       will not do |
+    p*        done by
 
 <to-do-present> ::=
     do | do | does | do | do | do
@@ -1024,10 +1024,10 @@ to "grabs onto", "grabbing onto" and so on.
 
 
 <regular-verb-conjugation> ::=
-    2 		<en-trie-present-participle> |
-    3 		<en-trie-past-participle> |
-    5 		<en-trie-present-verb-form> |
-    6 		<en-trie-past> |
+    2         <en-trie-present-participle> |
+    3         <en-trie-past-participle> |
+    5         <en-trie-present-verb-form> |
+    6         <en-trie-past> |
     <regular-verb-tabulation>
 
@@ -1044,15 +1044,15 @@ a bequest".)
 <regular-verb-tabulation> ::=
-    a1+		<regular-verb-present> |
-    a1-		( do ) 1 |
-    a2+		6 |
-    a2-		( do ) 1 |
-    a3		( t1 auxiliary-have ) 3 |
-    a4		( t2 auxiliary-have ) 3 |
-    a5+		will 1 |
-    a5-		will not 1 |
-    p*		3 by
+    a1+       <regular-verb-present> |
+    a1-       ( do ) 1 |
+    a2+       6 |
+    a2-       ( do ) 1 |
+    a3        ( t1 auxiliary-have ) 3 |
+    a4        ( t2 auxiliary-have ) 3 |
+    a5+       will 1 |
+    a5-       will not 1 |
+    p*        3 by
 

§25. This looks odd, but what it says is that the present tense of a regular @@ -1077,14 +1077,14 @@ as we'll see.) <to-be-tabulation> <to-be-tabulation> ::= - a1+ <to-be-present> | - a1- <to-be-present> not | - a2+ <to-be-past> | - a2- <to-be-past> not | - a3 ( t1 auxiliary-have ) been | - a4 ( t2 auxiliary-have ) been | - a5+ will be | - a5- will not be + a1+ <to-be-present> | + a1- <to-be-present> not | + a2+ <to-be-past> | + a2- <to-be-past> not | + a3 ( t1 auxiliary-have ) been | + a4 ( t2 auxiliary-have ) been | + a5+ will be | + a5- will not be <to-be-present> ::= am | are | is | are | are | are @@ -1117,19 +1117,19 @@ to elide, so we always pronounce it that way and the spelling now follows.

 <to-be-able-to-conjugation> ::=
-    2 		<en-trie-present-participle> |
-    3 		<en-trie-past-participle> |
+    2         <en-trie-present-participle> |
+    3         <en-trie-past-participle> |
     <to-be-able-to-tabulation>
 
 <to-be-able-to-tabulation> ::=
-    a1+		can ++1 |
-    a1-		cannot ++1 |
-    a2+		could ++1 |
-    a2-		could not ++1 |
-    a3		( t1 auxiliary-have ) been able to ++1 |
-    a4		( t2 auxiliary-have ) been able to ++1 |
-    a5+		will be able to ++1 |
-    a5-		will not be able to ++1
+    a1+       can ++1 |
+    a1-       cannot ++1 |
+    a2+       could ++1 |
+    a2-       could not ++1 |
+    a3        ( t1 auxiliary-have ) been able to ++1 |
+    a4        ( t2 auxiliary-have ) been able to ++1 |
+    a5+       will be able to ++1 |
+    a5-       will not be able to ++1
 

§28. Inform has only a simple understanding of what "can" means, so it doesn't @@ -1166,13 +1166,13 @@ Jane".

 <to-be-able-to-auxiliary> ::=
-    2 		<en-trie-present-participle> |
-    3 		<en-trie-past-participle> |
+    2        <en-trie-present-participle> |
+    3        <en-trie-past-participle> |
     <to-be-able-to-auxiliary-tabulation>
 
 <to-be-able-to-auxiliary-tabulation> ::=
-    a		( be able to ) 4 |
-    p		( be able to ) be 3 ( 4 ) by
+    a        ( be able to ) 4 |
+    p        ( be able to ) be 3 ( 4 ) by
 

§29. The following handles the other English modal verbs ("might", "should" @@ -1183,21 +1183,21 @@ being modified should appear in verb form 1, and so on: for example,

 <modal-conjugation> ::=
-    2 		<en-trie-present-participle> |
-    3 		<en-trie-past-participle> |
+    2         <en-trie-present-participle> |
+    3         <en-trie-past-participle> |
     <modal-tabulation>
 
 <modal-tabulation> ::=
-    a1+		4 ++1 |
-    a1-		4 not ++1 |
-    a2+		4 have ++2 |
-    a2-		4 not have ++2 |
-    a3+		4 have ++2 |
-    a3-		4 not have ++2 |
-    a4+		4 have ++2 |
-    a4-		4 not have ++2 |
-    a5+		4 ++1 |
-    a5-		4 not ++1
+    a1+       4 ++1 |
+    a1-       4 not ++1 |
+    a2+       4 have ++2 |
+    a2-       4 not have ++2 |
+    a3+       4 have ++2 |
+    a3-       4 not have ++2 |
+    a4+       4 have ++2 |
+    a4-       4 not have ++2 |
+    a5+       4 ++1 |
+    a5-       4 not ++1
 

§30. That completes our basic kit of verbs nicely. What's left is used only @@ -1241,16 +1241,16 @@ dialects — and we aren't even going to try to cope with that. <contracted-to-be-tabulation> <contracted-to-be-tabulation> ::= - a1+ <contracted-to-be-present> | - a1- <contracted-to-be-present> not | - a2+ <contracted-to-be-past> | - a2- <contracted-to-be-past-negated> | - a3+ <contracted-to-have-present> been | - a3- <contracted-to-have-present> not been | - a4+ 'd been | - a4- 'd not been | - a5+ 'll be | - a5- 'll not be + a1+ <contracted-to-be-present> | + a1- <contracted-to-be-present> not | + a2+ <contracted-to-be-past> | + a2- <contracted-to-be-past-negated> | + a3+ <contracted-to-have-present> been | + a3- <contracted-to-have-present> not been | + a4+ 'd been | + a4- 'd not been | + a5+ 'll be | + a5- 'll not be <contracted-to-be-present> ::= 'm | 're | 's | 're | 're | 're @@ -1298,16 +1298,16 @@ go with those. <contracted-to-have-tabulation> <contracted-to-have-tabulation> ::= - a1+ <contracted-to-have-present> | - a1- <contracted-to-have-present> not | - a2+ had | - a2- hadn't | - a3+ <contracted-to-have-present> had | - a3- <contracted-to-have-present> not had | - a4+ 'd had | - a4- 'd not had | - a5+ 'll have | - a5- 'll not have + a1+ <contracted-to-have-present> | + a1- <contracted-to-have-present> not | + a2+ had | + a2- hadn't | + a3+ <contracted-to-have-present> had | + a3- <contracted-to-have-present> not had | + a4+ 'd had | + a4- 'd not had | + a5+ 'll have | + a5- 'll not have <contracted-to-have-present> ::= 've | 've | 's | 've | 've | 've @@ -1335,11 +1335,11 @@ that option here.) <arent-tabulation> <arent-tabulation> ::= - a1+ <arent-present> | - a2+ <arent-past> | - a3+ <arent-perfect> | - a4+ hadn't been | - a5+ won't be + a1+ <arent-present> | + a2+ <arent-past> | + a3+ <arent-perfect> | + a4+ hadn't been | + a5+ won't be <arent-present> ::= am not | aren't | isn't | aren't | aren't | aren't @@ -1348,7 +1348,7 @@ that option here.) wasn't | weren't | wasn't | weren't | weren't | weren't <arent-perfect> ::= - haven't been | haven't been | hasn't been | haven't been | haven't been | haven't been + haven't been | haven't been | hasn't been | haven't been | haven't been | haven't been

§33. And finally: the contracted informal negatives of various modal verbs which @@ -1365,20 +1365,20 @@ of "modal" itself arguable. This is the best we can do.

 <informal-negated-modal-conjugation> ::=
-    2 		<en-trie-present-participle> |
-    3 		<en-trie-past-participle> |
-    5 		<en-trie-modal-contracted-past> |
-    6 		<en-trie-modal-contracted-future> |
-    7 		<en-trie-modal-contracted-present> |
+    2         <en-trie-present-participle> |
+    3         <en-trie-past-participle> |
+    5         <en-trie-modal-contracted-past> |
+    6         <en-trie-modal-contracted-future> |
+    7         <en-trie-modal-contracted-present> |
     <not-instance-of-verb-at-run-time> |
     <informal-negated-modal-tabulation>
 
 <informal-negated-modal-tabulation> ::=
-    a1+		<informal-negated-modal-present> ++1 |
-    a2+		5 ++2 |
-    a3+		5 ++2 |
-    a4+		5 ++2 |
-    a5+		6 ++1
+    a1+        <informal-negated-modal-present> ++1 |
+    a2+        5 ++2 |
+    a3+        5 ++2 |
+    a4+        5 ++2 |
+    a5+        6 ++1
 
 <informal-negated-modal-present> ::=
     1 | 1 | 7 | 1 | 1 | 1
@@ -1389,17 +1389,17 @@ of "modal" itself arguable. This is the best we can do.
 
 
 <cant-modal-conjugation> ::=
-    2 		<en-trie-present-participle> |
-    3 		<en-trie-past-participle> |
+    2         <en-trie-present-participle> |
+    3         <en-trie-past-participle> |
     <not-instance-of-verb-at-run-time> |
     <cant-modal-tabulation>
 
 <cant-modal-tabulation> ::=
-    a1+		can't ++1 |
-    a2+		couldn't ++1 |
-    a3+		( t1 haven't ) been able to ++1 |
-    a4+		( t2 haven't ) been able to ++1 |
-    a5+		won't be able to ++1
+    a1+        can't ++1 |
+    a2+        couldn't ++1 |
+    a3+        ( t1 haven't ) been able to ++1 |
+    a4+        ( t2 haven't ) been able to ++1 |
+    a5+        won't be able to ++1
 

§35. We have special tries just to list the forms of the cases we will @@ -1414,40 +1414,40 @@ signs can be used if we absolutely have to introduce spaces.

 <en-trie-modal-contracted-present> ::=
-    can't		can't |
-    don't		doesn't |
-    haven't		hasn't |
-    won't		won't |
-    mayn't		mayn't |
-    mightn't	mightn't |
-    mustn't		mustn't |
-    wouldn't	wouldn't |
-    couldn't	couldn't |
-    shouldn't	shouldn't
+    can't       can't |
+    don't       doesn't |
+    haven't     hasn't |
+    won't       won't |
+    mayn't      mayn't |
+    mightn't    mightn't |
+    mustn't     mustn't |
+    wouldn't    wouldn't |
+    couldn't    couldn't |
+    shouldn't   shouldn't
 
 <en-trie-modal-contracted-past> ::=
-    can't		couldn't |
-    don't		didn't |
-    haven't		hadn't |
-    won't		wouldn't |
-    mayn't		mayn't+have |
-    mightn't	mightn't+have |
-    mustn't		mustn't+have |
-    wouldn't	wouldn't+have |
-    couldn't	couldn't+have |
-    shouldn't	shouldn't+have
+    can't       couldn't |
+    don't       didn't |
+    haven't     hadn't |
+    won't       wouldn't |
+    mayn't      mayn't+have |
+    mightn't    mightn't+have |
+    mustn't     mustn't+have |
+    wouldn't    wouldn't+have |
+    couldn't    couldn't+have |
+    shouldn't   shouldn't+have
 
 <en-trie-modal-contracted-future> ::=
-    can't		won't+be+able+to |
-    don't		won't |
-    haven't		won't+have |
-    won't		won't |
-    mayn't		mayn't |
-    mightn't	mightn't |
-    mustn't		mustn't |
-    wouldn't	wouldn't |
-    couldn't	couldn't |
-    shouldn't	shouldn't
+    can't       won't+be+able+to |
+    don't       won't |
+    haven't     won't+have |
+    won't       won't |
+    mayn't      mayn't |
+    mightn't    mightn't |
+    mustn't     mustn't |
+    wouldn't    wouldn't |
+    couldn't    couldn't |
+    shouldn't   shouldn't
 

§36. That's the end of the conjugations — the easy part, it turns out. We now @@ -1528,10 +1528,10 @@ from the act of producing a song. invalid 0ing | ref 0fing | stravaig 0ing | - scoog 0ing | - scoug 0ing | - yak 0king | - yok 0king | + scoog 0ing | + scoug 0ing | + yak 0king | + yok 0king | lek 0king | trek 0king | spaniel 0ling | @@ -1547,35 +1547,35 @@ from the act of producing a song. chalan 0ing | challan 0ing | tyran 0ning | - den 0ning | - hen 0ning | - ken 0ning | + den 0ning | + hen 0ning | + ken 0ning | misken 0ning | pen 0ning | unpen 0ning | sten 0ning | - in 0ning | - gin 0ning | + in 0ning | + gin 0ning | begin 0ning | - bin 0ning | - sin 0ning | + bin 0ning | + sin 0ning | damaskin 0ing | trampolin 0ing | chagrin 0ing | satin 0ing | - on 0ning | - con 0ning | - don 0ning | - kon 0ning | + on 0ning | + con 0ning | + don 0ning | + kon 0ning | fillip 0ing | turnip 0ing | sip 0ping | cop 0ping | lop 0ping | - clop 0ping | - flop 0ping | - plop 0ping | - slop 0ping | + clop 0ping | + flop 0ping | + plop 0ping | + slop 0ping | galop 0ping | up 0ping | cup 0ping | @@ -1598,9 +1598,9 @@ from the act of producing a song. ballat 0ing | curat 0ing | quadrat 0ing | - bet 0ting | + bet 0ting | abet 0ting | - fet 0ting | + fet 0ting | fidget 0ing | target 0ing | crochet 0ing | @@ -1618,8 +1618,8 @@ from the act of producing a song. pet 0ting | spet 0ting | ret 0ting | - aret 0ting | - fret 0ting | + aret 0ting | + fret 0ting | regret 0ting | basset 0ing | closet 0ing | @@ -1641,13 +1641,13 @@ from the act of producing a song. limit 0ing | delimit 0ing | vomit 0ing | - rit 0ting | + rit 0ting | frit 0ting | grit 0ting | - bit 0ting | - dit 0ting | - kit 0ting | - sit 0ting | + bit 0ting | + dit 0ting | + kit 0ting | + sit 0ting | besit 0ting | outsit 0ting | resit 0ting | @@ -1670,8 +1670,8 @@ from the act of producing a song. facsimile 0ing | glace 0ing | jeelie 0ing | - longe 0ing | - lunge 0ing | + longe 0ing | + lunge 0ing | ouglie 0ing | peenge 0ing | pie 0ing | @@ -1687,7 +1687,7 @@ from the act of producing a song. singe 0ing | sortie 0ing | stymie 0ing | - winge 0ing | + winge 0ing | swinge 0ing | tinge 0ing | unbe 0ing | @@ -1709,20 +1709,20 @@ from the act of producing a song.

 <en-trie-irregular-compound-present-participle> ::=
-    *<gosyz>ie 0ing  |    e.g. boogieing
-    *ae        0ing  |    e.g. spaeing
-    *quit     0ting  |    acquitting, quitting, requitting
-    *uret     0ting  |    carburetting, sulphuretting
-    *budget   0ing   |    budgeting, underbudgeting
-    *efer     0ring  |    deferring, preferring, referring
-    *nfer     0ring  |    conferring, inferring
-    *sfer     0ring  |    retransferring, transferring
-    *bias     0sing  |    biassing, unbiassing
-    *bishop   0ing   |    bishoping, unbishoping
-    *woman    0ing   |    womaning, unwomaning
-    *jambok   0king  |    jambokking, sjambokking
-    *alog     0ing   |    dialoging, cataloging
-    *daub     0ing        daubing, bedaubing
+    *<gosyz>ie  0ing   |    e.g. boogieing
+    *ae         0ing   |    e.g. spaeing
+    *quit       0ting  |    acquitting, quitting, requitting
+    *uret       0ting  |    carburetting, sulphuretting
+    *budget     0ing   |    budgeting, underbudgeting
+    *efer       0ring  |    deferring, preferring, referring
+    *nfer       0ring  |    conferring, inferring
+    *sfer       0ring  |    retransferring, transferring
+    *bias       0sing  |    biassing, unbiassing
+    *bishop     0ing   |    bishoping, unbishoping
+    *woman      0ing   |    womaning, unwomaning
+    *jambok     0king  |    jambokking, sjambokking
+    *alog       0ing   |    dialoging, cataloging
+    *daub       0ing        daubing, bedaubing
 

§40. And now rules for consonant doubling: @@ -1730,14 +1730,14 @@ from the act of producing a song.

 <en-trie-regular-a-present-participle> ::=
-    *<aeiouy>b            0bing       |
-    *<dglmpw>ad           0ding       |
-    *<bhlnrtw>ed          0ding       |
-    *<bklr>id             0ding       |
-    *<cdghlnprst>od       0ding       |
-    *<bchmprtw>ud         0ding       |
-    *uf                   0fing       |
-    *<aeiouy>g             0ging       |
+    *<aeiouy>b             0bing      |
+    *<dglmpw>ad            0ding      |
+    *<bhlnrtw>ed           0ding      |
+    *<bklr>id              0ding      |
+    *<cdghlnprst>od        0ding      |
+    *<bchmprtw>ud          0ding      |
+    *uf                    0fing      |
+    *<aeiouy>g             0ging      |
     *<bcdhiklmnprstuv>al   0ling      |
     *<bcdfghkmnprstuvwz>el 0ling      |
     *<cfmnrtv>il           0ling      |
@@ -1805,157 +1805,157 @@ removed.
     <en-trie-past>
 
 <en-trie-irregular-past-participle> ::=
-    be			been |
-    have		had |
-    do			did |
-    arise		arisen |
-    awake		awoken |
-    bear		borne |
-    beat		beaten |
-    become		become |
-    befall		befallen |
-    beget		begotten |
-    begin		begun |
-    bespeak		bespoken |
-    bite		bitten |
-    blow		blown |
-    break		broken |
-    browbeat	browbeaten |
-    choose		chosen |
-    cleave		cloven |
-    come		come |
-    dive		dived |
-    draw		drawn |
-    drink		drunk |
-    drive		driven |
-    eat			eaten |
-    fall		fallen |
-    fly			flown |
-    forbear		forborne |
-    forbid		forbidden |
-    forego		foregone |
-    foreknow	foreknown |
-    forelie		forlain |
-    forerun		forerun |
-    foresee		foreseen |
-    forget		forgotten |
-    forgive		forgiven |
-    forgo		forgone |
-    forsake		forsaken |
-    forswear	forsworn |
-    freeze		frozen |
-    ghostwrite	ghostwritten |
-    give		given |
-    go			gone |
-    grow		grown |
-    hew			hewn |
-    hide		hidden |
-    interweave	interwoven |
-    know		known |
-    lade		laden |
-    misbecome	misbecome |
-    misbeget	misbegotten |
-    mischoose	mischosen |
-    misdo		misdone |
-    misget		misgotten |
-    misgive		misgiven |
-    misknow		misknown |
-    misshape	misshapen |
-    misspeak	misspoken |
-    mistake		mistaken |
-    miswrite	miswritten |
-    mow			mown |
-    outdo		outdone |
-    outgrow		outgrown |
-    outgrow		outgrown |
-    outrun		outrun |
-    outshine	outshone |
-    outswear	outsworn |
-    outthrow	outthrown |
-    overbear	overborne |
-    overblow	overblown |
-    overclothe	overclad |
-    overcome	overcome |
-    overdo		overdone |
-    overdraw	overdrawn |
-    overdrink	overdrunk |
-    overdrive	overdriven |
-    overeat		overeaten |
-    overfly		overflown |
-    overgrow	overgrown |
-    overlie		overlain |
-    override	overridden |
-    overrun		overrun |
-    oversee		overseen |
-    oversew		oversewn |
-    overshake	overshaken |
-    overstride	overstridden |
-    overtake	overtaken |
-    overwear	overworn |
-    overwrite	overwritten |
-    partake		partaken |
-    plead		pled |
-    redo		redone |
-    redraw		redrawn |
-    regrow		regrown |
-    rerun		rerun |
-    resing		resung |
-    retake		retaken |
-    retread		retrodden |
-    rewrite		rewritten |
-    ride		ridden |
-    ring		rung |
-    rise		risen |
-    rive		riven |
-    run			run |
-    saw			sawn |
-    see			seen |
-    sew			sewn |
-    shake		shaken |
-    shave		shaven |
-    shear		shorn |
-    shine		shone |
-    shoe		shodden |
-    show		shown |
-    shrink		shrunk |
-    shrive		shriven |
-    sing		sung |
-    sink		sunk |
-    slay		slain |
-    smite		smitten |
-    sow			sown |
-    speak		spoken |
-    spin		spun |
-    spit		spit |
-    spring		sprung |
-    steal		stolen |
-    stink		stunk |
-    stride		stridden |
-    bestride	bestridden |
-    strike		stricken |
-    strive		striven |
-    swear		sworn |
-    swell		swollen |
-    take		taken |
-    tear		torn |
-    thrive		thriven |
-    throw		thrown |
-    tread		trodden |
-    underbear	underborne |
-    underdo		underdone |
-    underdraw	underdrawn |
-    undergo		undergone |
-    undergrow	undergrown |
-    underrun	underrun |
-    undertake	undertaken |
-    underwrite	underwritten |
-    undo		undone |
-    wake		woken |
-    wear		worn |
-    weave		woven |
-    withdraw	withdrawn |
-    wring		wrung |
-    write		written
+    be          been |
+    have        had |
+    do          did |
+    arise       arisen |
+    awake       awoken |
+    bear        borne |
+    beat        beaten |
+    become      become |
+    befall      befallen |
+    beget       begotten |
+    begin       begun |
+    bespeak     bespoken |
+    bite        bitten |
+    blow        blown |
+    break       broken |
+    browbeat    browbeaten |
+    choose      chosen |
+    cleave      cloven |
+    come        come |
+    dive        dived |
+    draw        drawn |
+    drink       drunk |
+    drive       driven |
+    eat         eaten |
+    fall        fallen |
+    fly         flown |
+    forbear     forborne |
+    forbid      forbidden |
+    forego      foregone |
+    foreknow    foreknown |
+    forelie     forlain |
+    forerun     forerun |
+    foresee     foreseen |
+    forget      forgotten |
+    forgive     forgiven |
+    forgo       forgone |
+    forsake     forsaken |
+    forswear    forsworn |
+    freeze      frozen |
+    ghostwrite  ghostwritten |
+    give        given |
+    go          gone |
+    grow        grown |
+    hew         hewn |
+    hide        hidden |
+    interweave  interwoven |
+    know        known |
+    lade        laden |
+    misbecome   misbecome |
+    misbeget    misbegotten |
+    mischoose   mischosen |
+    misdo       misdone |
+    misget      misgotten |
+    misgive     misgiven |
+    misknow     misknown |
+    misshape    misshapen |
+    misspeak    misspoken |
+    mistake     mistaken |
+    miswrite    miswritten |
+    mow         mown |
+    outdo       outdone |
+    outgrow     outgrown |
+    outgrow     outgrown |
+    outrun      outrun |
+    outshine    outshone |
+    outswear    outsworn |
+    outthrow    outthrown |
+    overbear    overborne |
+    overblow    overblown |
+    overclothe  overclad |
+    overcome    overcome |
+    overdo      overdone |
+    overdraw    overdrawn |
+    overdrink   overdrunk |
+    overdrive   overdriven |
+    overeat     overeaten |
+    overfly     overflown |
+    overgrow    overgrown |
+    overlie     overlain |
+    override    overridden |
+    overrun     overrun |
+    oversee     overseen |
+    oversew     oversewn |
+    overshake   overshaken |
+    overstride  overstridden |
+    overtake    overtaken |
+    overwear    overworn |
+    overwrite   overwritten |
+    partake     partaken |
+    plead       pled |
+    redo        redone |
+    redraw      redrawn |
+    regrow      regrown |
+    rerun       rerun |
+    resing      resung |
+    retake      retaken |
+    retread     retrodden |
+    rewrite     rewritten |
+    ride        ridden |
+    ring        rung |
+    rise        risen |
+    rive        riven |
+    run         run |
+    saw         sawn |
+    see         seen |
+    sew         sewn |
+    shake       shaken |
+    shave       shaven |
+    shear       shorn |
+    shine       shone |
+    shoe        shodden |
+    show        shown |
+    shrink      shrunk |
+    shrive      shriven |
+    sing        sung |
+    sink        sunk |
+    slay        slain |
+    smite       smitten |
+    sow         sown |
+    speak       spoken |
+    spin        spun |
+    spit        spit |
+    spring      sprung |
+    steal       stolen |
+    stink       stunk |
+    stride      stridden |
+    bestride    bestridden |
+    strike      stricken |
+    strive      striven |
+    swear       sworn |
+    swell       swollen |
+    take        taken |
+    tear        torn |
+    thrive      thriven |
+    throw       thrown |
+    tread       trodden |
+    underbear   underborne |
+    underdo     underdone |
+    underdraw   underdrawn |
+    undergo     undergone |
+    undergrow   undergrown |
+    underrun    underrun |
+    undertake   undertaken |
+    underwrite  underwritten |
+    undo        undone |
+    wake        woken |
+    wear        worn |
+    weave       woven |
+    withdraw    withdrawn |
+    wring       wrung |
+    write       written
 

§43. That's the mandatory participles sorted out; so now we move on to the two @@ -1971,9 +1971,9 @@ of exceptions to this. ... <singular-noun-to-its-plural> <en-trie-irregular-third-person-present> ::= - be is | - have has | - do does + be is | + have has | + do does

§44. Second, the past. This is harder. Once again we have a catalogue of @@ -1992,548 +1992,548 @@ when to double the consonant, which again depends on stress. ... <en-trie-regular-c-past> <en-trie-irregular-past> ::= - be was | - do did | - go went | - in 0ned | - on 0ned | - up 0ped | - bet bet | - abet 0ted | - bid bid | - bin 0ned | - bit 0ted | - buy bought | - con 0ned | - cop 0ped | - cup 0ped | - cut cut | - den 0ned | - dig dug | - dit 0ted | - div 0ed | - don 0ned | - eat ate | - fet 0ted | - fit fitted | - fly flew | - fur 0red | - gar 0red | - get got | - gin 0ned | - had 0ded | - hem 0med | - hen 0ned | - hit hit | - ken 0ned | - kit 0ted | - kon 0ned | - lay laid | - lek 0ked | - let let | - let 0ted | - lop 0ped | - net 0ted | - ante 0ed | - nye 1ed | - pay paid | - pen penned | - pet 0ted | - pie 1ed | - put put | - ref 0fed | - ret 0ted | - aret 0ted | - rid rid | - rit 0ted | - run ran | - say said | - see saw | - set set | - sin 0ned | - sip 0ped | - sit sat | - sus 0sed | - aver 0red | - vor 0red | - wed wedded | - wet wetted | - win won | - yak 0ked | - yok 0ked | - baye 1ed | - bear bore | - beat beat | - bend bent | - abhor 0red | - abide abided | - bide bided | - bind bound | - bite bit | - blet 0ted | - blow blew | - boob 0ed | - brut 0ed | - burn burnt | - cast cast | - clop 0ped | - come came | - deal dealt | - dele 1ed | - dive dove | - drag dragged | - draw drew | - duet 0ted | - fall fell | - feed fed | - feel felt | - find found | - flee fled | - flop 0ped | - fret 0ted | - frit 0ted | - give gave | - grit 0ted | - grow grew | - hang hung | - have had | - hear heard | - hide hid | - hold held | - hurt hurt | - item 0ed | - keep kept | - knit knit | - know knew | - lade laded | - lead led | - lend lent | - aleye 1ed | - lose lost | - make made | - mean meant | - meet met | - plop 0ped | - quad 0ded | - quit quit | - quod 0ded | - read read | - redo redid | - rend rent | - ride rode | - ring rang | - arise arose | - rise rose | - rive rove | - seek sought | - sell sold | - send sent | - shed shed | - shoe shoed | - shut shut | - sing sang | - sink sank | - sker 0red | - slip slipped | - slit slit | - slop 0ped | - smur 0red | - spet 0ted | - spin span | - spit spat | - sten 0ned | - stye 1ed | - swim swam | - take took | - tear tore | - tell told | - trek 0ked | - unbe 1ed | - undo undid | - vise 1ed | - awake awoke | - wake woke | - wear wore | - weep wept | - whid 0ded | - wind wound | - beget begot | - begin began | - benet 0ted | - beset beset | - besit 0ted | - binge 1ed | - bleed bled | - break broke | - breed bred | - bring brought | - build built | - burst burst | - catch caught | - cling clung | - covet 0ed | - creep crept | - curat 0ed | - debut 0ed | - demur 0red | - deter 0red | - drink drank | - drive drove | - fight fought | - fling flung | - forgo forwent | - galop 0ped | - glace 0ed | - grind ground | - herye 1ed | - hoise hoist | - inlay inlaid | - input input | - inset inset | - inter 0red | - kneel knelt | - alarum 0ed | - leave left | - light lit | - limit 0ed | - longe 1ed | - lunge 1ed | - madam 0ed | - misdo misdid | - outdo outdid | - picot 0ed | - pilot 0ed | - prove proved | - queue 1ed | - reave reft | - recce 1ed | - recut recut | - relet 0ted | - repay repaid | - rerun reran | - reset reset | - resit 0ted | - roset 0ed | - route 1ed | - salad 0ed | - satin 0ed | - saute 0ed | - scoog 0ed | - scoug 0ed | - segue 1ed | - shake shook | - shall should | - shape shaped | - shave shaved | - shine shined | - shoot shot | - singe 1ed | - sleep slept | - slide slid | - sling slung | - slink slunk | - smite smote | - speak spoke | - speed sped | - spell spelt | - spend spent | - split split | - squid 0ded | - stand stood | - steal stole | - stick stuck | - sting stung | - stink stank | - swear swore | - sweep swept | - swing swung | - teach taught | - think thought | - throw threw | - tinge 1ed | - tread trod | - tyran 0ned | - unpen 0ned | - unset unset | - upset upset | - vogue 1ed | - vomit 0ed | - weave wove | - winge 1ed | - worth worth | - wring wrang | - write wrote | - ballad 0ed | - ballat 0ed | - ballot 0ed | - basset 0ed | - become became | - befall befell | - behold beheld | - birdie 1ed | - caucus 0ed | - centre 1ed | - chalan 0ed | - chasse 1ed | - choose chose | - cleave clove | - closet 0ed | - clothe clothed | - combat 0ed | - coquet 0ted | - corset 0ed | - cosset 0ed | - emblem 0ed | - fidget 0ed | - fillip 0ed | - forbid forbade | - forego forewent | - forget forgot | - freeze froze | - gusset 0ed | - jeelie 1ed | - misfit misfitted | - misget misgot | - mishit mishit | - misken 0ned | - mislay mislaid | - missay missaid | - misset misset | - mortar 0ed | - naysay naysaid | - ouglie 1ed | - outbid outbid | - output output | - outrun outran | - outsit outsat | - overdo overdid | - parrot 0ed | - peenge 1ed | - posset 0ed | - possum 0ed | - prepay prepaid | - preset preset | - profit 0ed | - quaere 1ed | - rallye 1ed | - recast recast | - redraw redrew | - regret 0ted | - regrow regrew | - re-lay re-laid | - remake remade | - reread reread | - resell resold | - resend resent | - resing resang | - retake retook | - retell retold | - rewind rewound | - russet 0ed | - shrink shrank | - shrive shrove | - slalom 0ed | - sortie 1ed | - spread spread | - spring sprang | - stride strode | - strike struck | - string strung | - strive strove | - stymie 1ed | - sublet sublet | - sunset sunset | - swinge 1ed | - target 0ed | - thrive throve | - turnip 0ed | - unbend unbent | - unbind unbound | - unhear unheard | - unmake unmade | - unwind unwound | - uphold upheld | - velvet 0ed | - waylay waylaid | - whinge 1ed | - writhe writhed | - beseech besought | - bespeak bespoke | - briquet 0ted | - buckram 0ed | - chagrin 0ed | - challan 0ed | - crochet 0ed | - delimit 0ed | - epithet 0ed | - forbear forbore | - forelay forelaid | - forelie forlay | - forerun foreran | - foresee foresaw | - forgive forgave | - forsake forsook | - gainsay gainsaid | - inbreed inbred | - invalid 0ed | - leaflet 0ted | - lipread lipread | - miscast miscast | - misdeal misdealt | - misfeed misfed | - misgive misgave | - mishear misheard | - mishold misheld | - miskeep miskept | - misknow misknew | - mislead misled | - misread misread | - missend missent | - mistake mistook | - outgrow outgrew | - outride outrode | - outsell outsold | - outswim outswam | - outtell outtold | - outwear outwore | - overbid overbid | - overbuy overbought | - overeat overate | - overfly overflew | - overhit overhit | - overlay overlaid | - overlie overlay | - overnet 0ted | - overpay overpaid | - overrun overran | - oversee oversaw | - overset overset | - parquet 0ted | - partake partook | - podcast podcast | - precast precast | - quadrat 0ed | - ratchet 0ed | - rebuild rebuilt | - reinter 0red | - reroute 1ed | - reshoot reshot | - rethink rethought | - retread retrod | - rewrite rewrote | - schappe 1ed | - spaniel 0led | - underdo underdid | - undergo underwent | - unrivet 0ed | - vermeil 0led | - webcast webcast | - backbite backbit | - bespread bespread | - bestride bestrode | - browbeat browbeat | - cicerone 1ed | - crosscut crosscut | - damaskin 0ed | - disinter 0red | - ensilage 1ed | - forecast forecast | - foreknow foreknew | - foretell foretold | - forswear forswore | - intercut intercut | - misbeget misbegot | - misshape misshaped | - misshoot misshot | - misspeak misspoke | - misspell misspelt | - misspend misspent | - miswrite miswrote | - outdrink outdrunk | - outfight outfought | - outshine outshone | - outspend outspent | - outswear outswore | - outthink outthought | - outthrow outthrew | - overbear overbore | - overbend overbent | - overblow overblew | - overcast overcast | - overcome overcame | - overdraw overdrew | - overfeed overfed | - overgrow overgrew | - overhang overhung | - overhear overheard | - overlend overlent | - override overrode | - oversell oversold | - overslip overslipped | - overtake overtook | - overwear overwore | - sightsee sightsaw | - stravaig 0ed | - telecast telecast | - unclothe unclothed | - underbid underbid | - underbuy underbought | - undercut undercut | - underdig underdug | - underlay underlaid | - underlet 0ted | - underlie underlaid | - underpay underpaid | - underrun underran | - unfreeze unfroze | - withdraw withdrew | - withhold withheld | - broadcast broadcast | - discomfit 0ed | - facsimile 1ed | - misbecome misbecame | - mischoose mischose | - outthrust outthrust | - overbreed overbred | - overbuild overbuilt | - overdrink overdrank | - overdrive overdrove | - overshake overshook | - overshine overshone | - overshoot overshot | - oversleep overslept | - overslide overslid | - overspend overspent | - overswing overswung | - overwrite overwrote | - proofread proofread | - reaedifye 1ed | - restringe 1ed | - simulcast simulcast | - trampolin 0ed | - underbear underbore | - underbind underbound | - undercast undercast | - underdraw underdrew | - underfeed underfed | - undergrow undergrew | - underhang underhung | - undersaye 1ed | - undersell undersold | - undertake undertook | - withstand withstood | - ghostwrite ghostwrote | - interbreed interbred | - interweave interwove | - overclothe overclothed | - overstride overstrode | - underbuild underbuilt | - undershoot undershot | - underspend underspent | - understand understood | - underwrite underwrote | - underclothe underclothed | - misunderstand misunderstood + be was | + do did | + go went | + in 0ned | + on 0ned | + up 0ped | + bet bet | + abet 0ted | + bid bid | + bin 0ned | + bit 0ted | + buy bought | + con 0ned | + cop 0ped | + cup 0ped | + cut cut | + den 0ned | + dig dug | + dit 0ted | + div 0ed | + don 0ned | + eat ate | + fet 0ted | + fit fitted | + fly flew | + fur 0red | + gar 0red | + get got | + gin 0ned | + had 0ded | + hem 0med | + hen 0ned | + hit hit | + ken 0ned | + kit 0ted | + kon 0ned | + lay laid | + lek 0ked | + let let | + let 0ted | + lop 0ped | + net 0ted | + ante 0ed | + nye 1ed | + pay paid | + pen penned | + pet 0ted | + pie 1ed | + put put | + ref 0fed | + ret 0ted | + aret 0ted | + rid rid | + rit 0ted | + run ran | + say said | + see saw | + set set | + sin 0ned | + sip 0ped | + sit sat | + sus 0sed | + aver 0red | + vor 0red | + wed wedded | + wet wetted | + win won | + yak 0ked | + yok 0ked | + baye 1ed | + bear bore | + beat beat | + bend bent | + abhor 0red | + abide abided | + bide bided | + bind bound | + bite bit | + blet 0ted | + blow blew | + boob 0ed | + brut 0ed | + burn burnt | + cast cast | + clop 0ped | + come came | + deal dealt | + dele 1ed | + dive dove | + drag dragged | + draw drew | + duet 0ted | + fall fell | + feed fed | + feel felt | + find found | + flee fled | + flop 0ped | + fret 0ted | + frit 0ted | + give gave | + grit 0ted | + grow grew | + hang hung | + have had | + hear heard | + hide hid | + hold held | + hurt hurt | + item 0ed | + keep kept | + knit knit | + know knew | + lade laded | + lead led | + lend lent | + aleye 1ed | + lose lost | + make made | + mean meant | + meet met | + plop 0ped | + quad 0ded | + quit quit | + quod 0ded | + read read | + redo redid | + rend rent | + ride rode | + ring rang | + arise arose | + rise rose | + rive rove | + seek sought | + sell sold | + send sent | + shed shed | + shoe shoed | + shut shut | + sing sang | + sink sank | + sker 0red | + slip slipped | + slit slit | + slop 0ped | + smur 0red | + spet 0ted | + spin span | + spit spat | + sten 0ned | + stye 1ed | + swim swam | + take took | + tear tore | + tell told | + trek 0ked | + unbe 1ed | + undo undid | + vise 1ed | + awake awoke | + wake woke | + wear wore | + weep wept | + whid 0ded | + wind wound | + beget begot | + begin began | + benet 0ted | + beset beset | + besit 0ted | + binge 1ed | + bleed bled | + break broke | + breed bred | + bring brought | + build built | + burst burst | + catch caught | + cling clung | + covet 0ed | + creep crept | + curat 0ed | + debut 0ed | + demur 0red | + deter 0red | + drink drank | + drive drove | + fight fought | + fling flung | + forgo forwent | + galop 0ped | + glace 0ed | + grind ground | + herye 1ed | + hoise hoist | + inlay inlaid | + input input | + inset inset | + inter 0red | + kneel knelt | + alarum 0ed | + leave left | + light lit | + limit 0ed | + longe 1ed | + lunge 1ed | + madam 0ed | + misdo misdid | + outdo outdid | + picot 0ed | + pilot 0ed | + prove proved | + queue 1ed | + reave reft | + recce 1ed | + recut recut | + relet 0ted | + repay repaid | + rerun reran | + reset reset | + resit 0ted | + roset 0ed | + route 1ed | + salad 0ed | + satin 0ed | + saute 0ed | + scoog 0ed | + scoug 0ed | + segue 1ed | + shake shook | + shall should | + shape shaped | + shave shaved | + shine shined | + shoot shot | + singe 1ed | + sleep slept | + slide slid | + sling slung | + slink slunk | + smite smote | + speak spoke | + speed sped | + spell spelt | + spend spent | + split split | + squid 0ded | + stand stood | + steal stole | + stick stuck | + sting stung | + stink stank | + swear swore | + sweep swept | + swing swung | + teach taught | + think thought | + throw threw | + tinge 1ed | + tread trod | + tyran 0ned | + unpen 0ned | + unset unset | + upset upset | + vogue 1ed | + vomit 0ed | + weave wove | + winge 1ed | + worth worth | + wring wrang | + write wrote | + ballad 0ed | + ballat 0ed | + ballot 0ed | + basset 0ed | + become became | + befall befell | + behold beheld | + birdie 1ed | + caucus 0ed | + centre 1ed | + chalan 0ed | + chasse 1ed | + choose chose | + cleave clove | + closet 0ed | + clothe clothed | + combat 0ed | + coquet 0ted | + corset 0ed | + cosset 0ed | + emblem 0ed | + fidget 0ed | + fillip 0ed | + forbid forbade | + forego forewent | + forget forgot | + freeze froze | + gusset 0ed | + jeelie 1ed | + misfit misfitted | + misget misgot | + mishit mishit | + misken 0ned | + mislay mislaid | + missay missaid | + misset misset | + mortar 0ed | + naysay naysaid | + ouglie 1ed | + outbid outbid | + output output | + outrun outran | + outsit outsat | + overdo overdid | + parrot 0ed | + peenge 1ed | + posset 0ed | + possum 0ed | + prepay prepaid | + preset preset | + profit 0ed | + quaere 1ed | + rallye 1ed | + recast recast | + redraw redrew | + regret 0ted | + regrow regrew | + re-lay re-laid | + remake remade | + reread reread | + resell resold | + resend resent | + resing resang | + retake retook | + retell retold | + rewind rewound | + russet 0ed | + shrink shrank | + shrive shrove | + slalom 0ed | + sortie 1ed | + spread spread | + spring sprang | + stride strode | + strike struck | + string strung | + strive strove | + stymie 1ed | + sublet sublet | + sunset sunset | + swinge 1ed | + target 0ed | + thrive throve | + turnip 0ed | + unbend unbent | + unbind unbound | + unhear unheard | + unmake unmade | + unwind unwound | + uphold upheld | + velvet 0ed | + waylay waylaid | + whinge 1ed | + writhe writhed | + beseech besought | + bespeak bespoke | + briquet 0ted | + buckram 0ed | + chagrin 0ed | + challan 0ed | + crochet 0ed | + delimit 0ed | + epithet 0ed | + forbear forbore | + forelay forelaid | + forelie forlay | + forerun foreran | + foresee foresaw | + forgive forgave | + forsake forsook | + gainsay gainsaid | + inbreed inbred | + invalid 0ed | + leaflet 0ted | + lipread lipread | + miscast miscast | + misdeal misdealt | + misfeed misfed | + misgive misgave | + mishear misheard | + mishold misheld | + miskeep miskept | + misknow misknew | + mislead misled | + misread misread | + missend missent | + mistake mistook | + outgrow outgrew | + outride outrode | + outsell outsold | + outswim outswam | + outtell outtold | + outwear outwore | + overbid overbid | + overbuy overbought | + overeat overate | + overfly overflew | + overhit overhit | + overlay overlaid | + overlie overlay | + overnet 0ted | + overpay overpaid | + overrun overran | + oversee oversaw | + overset overset | + parquet 0ted | + partake partook | + podcast podcast | + precast precast | + quadrat 0ed | + ratchet 0ed | + rebuild rebuilt | + reinter 0red | + reroute 1ed | + reshoot reshot | + rethink rethought | + retread retrod | + rewrite rewrote | + schappe 1ed | + spaniel 0led | + underdo underdid | + undergo underwent | + unrivet 0ed | + vermeil 0led | + webcast webcast | + backbite backbit | + bespread bespread | + bestride bestrode | + browbeat browbeat | + cicerone 1ed | + crosscut crosscut | + damaskin 0ed | + disinter 0red | + ensilage 1ed | + forecast forecast | + foreknow foreknew | + foretell foretold | + forswear forswore | + intercut intercut | + misbeget misbegot | + misshape misshaped | + misshoot misshot | + misspeak misspoke | + misspell misspelt | + misspend misspent | + miswrite miswrote | + outdrink outdrunk | + outfight outfought | + outshine outshone | + outspend outspent | + outswear outswore | + outthink outthought | + outthrow outthrew | + overbear overbore | + overbend overbent | + overblow overblew | + overcast overcast | + overcome overcame | + overdraw overdrew | + overfeed overfed | + overgrow overgrew | + overhang overhung | + overhear overheard | + overlend overlent | + override overrode | + oversell oversold | + overslip overslipped | + overtake overtook | + overwear overwore | + sightsee sightsaw | + stravaig 0ed | + telecast telecast | + unclothe unclothed | + underbid underbid | + underbuy underbought | + undercut undercut | + underdig underdug | + underlay underlaid | + underlet 0ted | + underlie underlaid | + underpay underpaid | + underrun underran | + unfreeze unfroze | + withdraw withdrew | + withhold withheld | + broadcast broadcast | + discomfit 0ed | + facsimile 1ed | + misbecome misbecame | + mischoose mischose | + outthrust outthrust | + overbreed overbred | + overbuild overbuilt | + overdrink overdrank | + overdrive overdrove | + overshake overshook | + overshine overshone | + overshoot overshot | + oversleep overslept | + overslide overslid | + overspend overspent | + overswing overswung | + overwrite overwrote | + proofread proofread | + reaedifye 1ed | + restringe 1ed | + simulcast simulcast | + trampolin 0ed | + underbear underbore | + underbind underbound | + undercast undercast | + underdraw underdrew | + underfeed underfed | + undergrow undergrew | + underhang underhung | + undersaye 1ed | + undersell undersold | + undertake undertook | + withstand withstood | + ghostwrite ghostwrote | + interbreed interbred | + interweave interwove | + overclothe overclothed | + overstride overstrode | + underbuild underbuilt | + undershoot undershot | + underspend underspent | + understand understood | + underwrite underwrote | + underclothe underclothed | + misunderstand misunderstood <en-trie-irregular-compound-past> ::= *<gosyz>ie 1ed | e.g. boogied @@ -2552,14 +2552,14 @@ when to double the consonant, which again depends on stress. *daub 0ed daubed , bedaubed <en-trie-regular-a-past> ::= - *<aeiouy>b 0bed | - *<dglmpw>ad 0ded | - *<bhlnrtw>ed 0ded | - *<bklr>id 0ded | - *<cdghlnprst>od 0ded | - *<bchmprtw>ud 0ded | - *uf 0fed | - *<aeiouy>g 0ged | + *<aeiouy>b 0bed | + *<dglmpw>ad 0ded | + *<bhlnrtw>ed 0ded | + *<bklr>id 0ded | + *<cdghlnprst>od 0ded | + *<bchmprtw>ud 0ded | + *uf 0fed | + *<aeiouy>g 0ged | *<bcdhiklmnprstuv>al 0led | *<bcdfghkmnprstuvwz>el 0led | *<cfmnrtv>il 0led | @@ -2599,13 +2599,13 @@ when to double the consonant, which again depends on stress. *iz 0zed <en-trie-regular-b-past> ::= - *<aeiou>c 0ked | magicked - *<eioy>e 1ed | dried - *<aeiou>y 0ed played, conveyed, convoyed, guyed, preyed + *<aeiou>c 0ked | magicked + *<eioy>e 1ed | dried + *<aeiou>y 0ed played, conveyed, convoyed, guyed, preyed <en-trie-regular-c-past> ::= - *e 1ed | - *y 1ied | shied, tried + *e 1ed | + *y 1ied | shied, tried * 0ed

@@ -2644,478 +2644,478 @@ cases followed by two general rules. ... <en-trie-pasturise-regular> <en-trie-pasturise-exceptions> ::= - abiding abided | - alighting alighted | - arising arisen | - awaking awakened | - backbiting backbitten | - backsliding backslidden | - bearing born | - beating beaten | - becoming become | - befalling befallen | - begeting begotten | - begining begun | - beholding beheld | - bending bent | - bereaving bereaved | - beseeching besought | - besetting beset | - bestrewing bestrewn | - betting bet | - betaking betaken | - bethinking bethought | - binding bound | - biting bitten | - bleeding bled | - blowing blown | - breaking broken | - breeding bred | - bringing brought | - broadcasting broadcast | - browbeating browbeaten | - building built | - burning burned | - bursting burst | - busting busted | - buying bought | - casting cast | - catching caught | - chiding chided | - choosing chosen | - claping clapped | - clinging clung | - clothing clothed | - coming come | - costing cost | - creeping crept | - crossbreeding crossbred | - cutting cut | - daring dared | - daydreaming daydreamed | - dealing dealt | - diging dug | - dighting dighted | - disproving disproved | - diving dived | - doing done | - drawing drawn | - dreaming dreamed | - drinking drunk | - driving driven | - dwelling dwelt | - eating eaten | - enwinding enwound | - falling fallen | - feeding fed | - feeling felt | - fighting fought | - finding found | - fitting fitted | - fleeing fled | - flinging flung | - flying flown | - forbearing forborne | - forbiding forbidden | - fordoing fordone | - forecasting forecast | - foregoing foregone | - foreknowing foreknown | - foreruning forerun | - foreseeing foreseen | - foreshowing foreshown | - forespeaking forespoken | - foretelling foretold | - forgetting forgotten | - forgiving forgiven | - forsaking forsaken | - forswearing forsworn | - fraughting fraught | - freezing frozen | - frostbiting frostbitten | - gainsaying gainsaid | - getting got | - gilding gilded | - giving given | - going gone | - grinding ground | - growing grown | - halterbreaking halterbroken | - hamstringing hamstrung | - hand-feeding hand-fed | - handwriting handwritten | - hanging hung | - hearing heard | - heaving heaved | - hewing hewn | - hiding hidden | - hitting hit | - holding held | - hurting hurt | - inbreeding inbred | - inlaying inlaid | - inputing input | - insetting inset | - interbreeding interbred | - intercutting intercut | - interlaying interlaid | - intersetting interset | - interweaving interwoven | - interwinding interwound | - inweaving inwoven | - jerry-building jerry-built | - keeping kept | - kneeling knelt | - knitting knitted | - knowing known | - lading laden | - landsliding landslid | - laying laid | - leading led | - leaning leaned | - leaping leaped | - learning learned | - leaving left | - lending lent | - letting let | - lieing lain | - lighting lit | - lip-reading lip-read | - losing lost | - making made | - meaning meant | - meeting met | - misbecoming misbecome | - miscasting miscast | - miscutting miscut | - misdealing misdealt | - misdoing misdone | - mishearing misheard | - mishitting mishit | - mislaying mislaid | - misleading misled | - mislearning mislearned | - misreading misread | - missaying missaid | - missending missent | - missetting misset | - misspeaking misspoken | - misspelling misspelled | - misspending misspent | - misswearing missworn | - mistaking mistaken | - misteaching mistaught | - mistelling mistold | - misthinking misthought | - misunderstanding misunderstood | - miswearing misworn | - misweding miswed | - miswriting miswritten | - mowing mowed | - offsetting offset | - outbiding outbid | - outbreeding outbred | - outdoing outdone | - outdrawing outdrawn | - outdrinking outdrunk | - outdriving outdriven | - outfighting outfought | - outflying outflown | - outgrowing outgrown | - outlaying outlaid | - outleaping outleaped | - outputing output | - outriding outridden | - outruning outrun | - outseeing outseen | - outselling outsold | - outshining outshined | - outshooting outshot | - outsinging outsung | - outsitting outsat | - outsleeping outslept | - outsmelling outsmelled | - outspeaking outspoken | - outspeeding outsped | - outspending outspent | - outspining outspun | - outspringing outsprung | - outstanding outstood | - outswearing outsworn | - outswiming outswum | - outtelling outtold | - outthinking outthought | - outthrowing outthrown | - outwearing outworn | - outwinding outwound | - outwriting outwritten | - overbearing overborne | - overbiding overbid | - overbreeding overbred | - overbuilding overbuilt | - overbuying overbought | - overcasting overcast | - overcoming overcome | - overcutting overcut | - overdoing overdone | - overdrawing overdrawn | - overdrinking overdrunk | - overeating overeaten | - overfeeding overfed | - overhanging overhung | - overhearing overheard | - overlaying overlaid | - overleaping overleaped | - overlieing overlain | - overpaying overpaid | - overriding overridden | - overruning overrun | - overseeing overseen | - overselling oversold | - oversetting overset | - oversewing oversewn | - overshooting overshot | - oversleeping overslept | - oversowing oversown | - overspeaking overspoken | - overspending overspent | - overspilling overspilled | - overspining overspun | - overspreading overspread | - overspringing oversprung | - overstanding overstood | - overstrewing overstrewn | - overstriding overstridden | - overstriking overstruck | - overtaking overtaken | - overthinking overthought | - overthrowing overthrown | - overwearing overworn | - overwinding overwound | - overwriting overwritten | - partaking partaken | - paying paid | - pleading pleaded | - praying prayed | - prebuilding prebuilt | - predoing predone | - premaking premade | - prepaying prepaid | - preselling presold | - presetting preset | - preshrinking preshrunk | - presplitting presplit | - proofreading proofread | - proving proven | - putting put | - quick-freezing quick-frozen | - quiting quit | - reading read | - reawaking reawaken | - rebiding rebid | - rebinding rebound | - rebroadcasting rebroadcast | - rebuilding rebuilt | - recasting recast | - recutting recut | - redealing redealt | - redoing redone | - redrawing redrawn | - reeving reeved | - refitting refitted | - regrinding reground | - regrowing regrown | - rehanging rehung | - rehearing reheard | - reknitting reknitted | - relearning relearned | - relighting relit | - remaking remade | - rending rent | - repaying repaid | - rereading reread | - reruning rerun | - reselling resold | - resending resent | - resetting reset | - resewing resewn | - retaking retaken | - reteaching retaught | - retearing retorn | - retelling retold | - rethinking rethought | - retreading retread | - retrofitting retrofitted | - rewaking rewaken | - rewearing reworn | - reweaving rewoven | - reweding rewed | - reweting rewet | - rewining rewon | - rewinding rewound | - rewriting rewritten | - riding rid | - riding ridden | - ringing rung | - rising risen | - riving riven | - roughcasting roughcast | - running run | - sand-casting sand-cast | - sawing sawed | - saying said | - seeing seen | - seeking sought | - self-feeding self-fed | - self-sowing self-sown | - selling sold | - sending sent | - setting set | - sewing sewn | - shaking shaken | - shaving shaved | - shearing sheared | - sheding shed | - shining shined | - shoeing shoed | - shooting shot | - showing shown | - shrinking shrunk | - shriving shriven | - shutting shut | - sight-reading sight-read | - singing sung | - sinking sunk | - siting sat | - skywriting skywritten | - sleeping slept | - sliding slid | - slinging slung | - slinking slinked | - slitting slit | - smelling smelled | - smiting smitten | - sneaking sneaked | - sowing sown | - speaking spoken | - speeding sped | - spelling spelled | - spending spent | - spilling spilled | - spinning spun | - spitting spit | - splitting split | - spoiling spoiled | - spoon-feeding spoon-fed | - spreading spread | - springing sprung | - stall-feeding stall-fed | - standing stood | - staving staved | - stealing stolen | - sticking stuck | - stinging stung | - stinking stunk | - strewing strewn | - striding stridden | - striking struck | - stringing strung | - striping stripped | - striving striven | - subletting sublet | - sunburning sunburned | - swearing sworn | - sweating sweat | - sweeping swept | - swelling swollen | - swiming swum | - swinging swung | - taking taken | - teaching taught | - tearing torn | - telecasting telecast | - telling told | - test-driving test-driven | - test-flying test-flown | - thinking thought | - thriving thrived | - throwing thrown | - thrusting thrust | - treading trodden | - troubleshooting troubleshot | - typecasting typecast | - typesetting typeset | - typewriting typewritten | - unbearing unborn | - unbending unbent | - unbinding unbound | - unbuilding unbuilt | - underbiding underbid | - underbuying underbought | - undercutting undercut | - underfeeding underfed | - undergoing undergone | - underlaying underlaid | - underletting underlet | - underlieing underlain | - underruning underrun | - underselling undersold | - undershooting undershot | - underspending underspent | - understanding understood | - undertaking undertaken | - underthrusting underthrust | - underwriting underwritten | - undoing undone | - undrawing undrawn | - unfreezing unfrozen | - unhanging unhung | - unhiding unhidden | - unholding unheld | - unknitting unknitted | - unlading unladen | - unlaying unlaid | - unlearning unlearned | - unmaking unmade | - unreeving unreeved | - unsaying unsaid | - unsewing unsewn | - unslinging unslung | - unspining unspun | - unsticking unstuck | - unstringing unstrung | - unswearing unsworn | - unteaching untaught | - unthinking unthought | - unweaving unwoven | - unwinding unwound | - unwriting unwritten | - upholding upheld | - upsetting upset | - vexing vexed | - waking woken | - waylaying waylaid | - wearing worn | - weaving woven | - weding wed | - weeping wept | - wetting wet | - wining won | - winding wound | - withdrawing withdrawn | - withholding withheld | - withstanding withstood | - wringing wrung | - writing written + abiding abided | + alighting alighted | + arising arisen | + awaking awakened | + backbiting backbitten | + backsliding backslidden | + bearing born | + beating beaten | + becoming become | + befalling befallen | + begeting begotten | + begining begun | + beholding beheld | + bending bent | + bereaving bereaved | + beseeching besought | + besetting beset | + bestrewing bestrewn | + betting bet | + betaking betaken | + bethinking bethought | + binding bound | + biting bitten | + bleeding bled | + blowing blown | + breaking broken | + breeding bred | + bringing brought | + broadcasting broadcast | + browbeating browbeaten | + building built | + burning burned | + bursting burst | + busting busted | + buying bought | + casting cast | + catching caught | + chiding chided | + choosing chosen | + claping clapped | + clinging clung | + clothing clothed | + coming come | + costing cost | + creeping crept | + crossbreeding crossbred | + cutting cut | + daring dared | + daydreaming daydreamed | + dealing dealt | + diging dug | + dighting dighted | + disproving disproved | + diving dived | + doing done | + drawing drawn | + dreaming dreamed | + drinking drunk | + driving driven | + dwelling dwelt | + eating eaten | + enwinding enwound | + falling fallen | + feeding fed | + feeling felt | + fighting fought | + finding found | + fitting fitted | + fleeing fled | + flinging flung | + flying flown | + forbearing forborne | + forbiding forbidden | + fordoing fordone | + forecasting forecast | + foregoing foregone | + foreknowing foreknown | + foreruning forerun | + foreseeing foreseen | + foreshowing foreshown | + forespeaking forespoken | + foretelling foretold | + forgetting forgotten | + forgiving forgiven | + forsaking forsaken | + forswearing forsworn | + fraughting fraught | + freezing frozen | + frostbiting frostbitten | + gainsaying gainsaid | + getting got | + gilding gilded | + giving given | + going gone | + grinding ground | + growing grown | + halterbreaking halterbroken | + hamstringing hamstrung | + hand-feeding hand-fed | + handwriting handwritten | + hanging hung | + hearing heard | + heaving heaved | + hewing hewn | + hiding hidden | + hitting hit | + holding held | + hurting hurt | + inbreeding inbred | + inlaying inlaid | + inputing input | + insetting inset | + interbreeding interbred | + intercutting intercut | + interlaying interlaid | + intersetting interset | + interweaving interwoven | + interwinding interwound | + inweaving inwoven | + jerry-building jerry-built | + keeping kept | + kneeling knelt | + knitting knitted | + knowing known | + lading laden | + landsliding landslid | + laying laid | + leading led | + leaning leaned | + leaping leaped | + learning learned | + leaving left | + lending lent | + letting let | + lieing lain | + lighting lit | + lip-reading lip-read | + losing lost | + making made | + meaning meant | + meeting met | + misbecoming misbecome | + miscasting miscast | + miscutting miscut | + misdealing misdealt | + misdoing misdone | + mishearing misheard | + mishitting mishit | + mislaying mislaid | + misleading misled | + mislearning mislearned | + misreading misread | + missaying missaid | + missending missent | + missetting misset | + misspeaking misspoken | + misspelling misspelled | + misspending misspent | + misswearing missworn | + mistaking mistaken | + misteaching mistaught | + mistelling mistold | + misthinking misthought | + misunderstanding misunderstood | + miswearing misworn | + misweding miswed | + miswriting miswritten | + mowing mowed | + offsetting offset | + outbiding outbid | + outbreeding outbred | + outdoing outdone | + outdrawing outdrawn | + outdrinking outdrunk | + outdriving outdriven | + outfighting outfought | + outflying outflown | + outgrowing outgrown | + outlaying outlaid | + outleaping outleaped | + outputing output | + outriding outridden | + outruning outrun | + outseeing outseen | + outselling outsold | + outshining outshined | + outshooting outshot | + outsinging outsung | + outsitting outsat | + outsleeping outslept | + outsmelling outsmelled | + outspeaking outspoken | + outspeeding outsped | + outspending outspent | + outspining outspun | + outspringing outsprung | + outstanding outstood | + outswearing outsworn | + outswiming outswum | + outtelling outtold | + outthinking outthought | + outthrowing outthrown | + outwearing outworn | + outwinding outwound | + outwriting outwritten | + overbearing overborne | + overbiding overbid | + overbreeding overbred | + overbuilding overbuilt | + overbuying overbought | + overcasting overcast | + overcoming overcome | + overcutting overcut | + overdoing overdone | + overdrawing overdrawn | + overdrinking overdrunk | + overeating overeaten | + overfeeding overfed | + overhanging overhung | + overhearing overheard | + overlaying overlaid | + overleaping overleaped | + overlieing overlain | + overpaying overpaid | + overriding overridden | + overruning overrun | + overseeing overseen | + overselling oversold | + oversetting overset | + oversewing oversewn | + overshooting overshot | + oversleeping overslept | + oversowing oversown | + overspeaking overspoken | + overspending overspent | + overspilling overspilled | + overspining overspun | + overspreading overspread | + overspringing oversprung | + overstanding overstood | + overstrewing overstrewn | + overstriding overstridden | + overstriking overstruck | + overtaking overtaken | + overthinking overthought | + overthrowing overthrown | + overwearing overworn | + overwinding overwound | + overwriting overwritten | + partaking partaken | + paying paid | + pleading pleaded | + praying prayed | + prebuilding prebuilt | + predoing predone | + premaking premade | + prepaying prepaid | + preselling presold | + presetting preset | + preshrinking preshrunk | + presplitting presplit | + proofreading proofread | + proving proven | + putting put | + quick-freezing quick-frozen | + quiting quit | + reading read | + reawaking reawaken | + rebiding rebid | + rebinding rebound | + rebroadcasting rebroadcast | + rebuilding rebuilt | + recasting recast | + recutting recut | + redealing redealt | + redoing redone | + redrawing redrawn | + reeving reeved | + refitting refitted | + regrinding reground | + regrowing regrown | + rehanging rehung | + rehearing reheard | + reknitting reknitted | + relearning relearned | + relighting relit | + remaking remade | + rending rent | + repaying repaid | + rereading reread | + reruning rerun | + reselling resold | + resending resent | + resetting reset | + resewing resewn | + retaking retaken | + reteaching retaught | + retearing retorn | + retelling retold | + rethinking rethought | + retreading retread | + retrofitting retrofitted | + rewaking rewaken | + rewearing reworn | + reweaving rewoven | + reweding rewed | + reweting rewet | + rewining rewon | + rewinding rewound | + rewriting rewritten | + riding rid | + riding ridden | + ringing rung | + rising risen | + riving riven | + roughcasting roughcast | + running run | + sand-casting sand-cast | + sawing sawed | + saying said | + seeing seen | + seeking sought | + self-feeding self-fed | + self-sowing self-sown | + selling sold | + sending sent | + setting set | + sewing sewn | + shaking shaken | + shaving shaved | + shearing sheared | + sheding shed | + shining shined | + shoeing shoed | + shooting shot | + showing shown | + shrinking shrunk | + shriving shriven | + shutting shut | + sight-reading sight-read | + singing sung | + sinking sunk | + siting sat | + skywriting skywritten | + sleeping slept | + sliding slid | + slinging slung | + slinking slinked | + slitting slit | + smelling smelled | + smiting smitten | + sneaking sneaked | + sowing sown | + speaking spoken | + speeding sped | + spelling spelled | + spending spent | + spilling spilled | + spinning spun | + spitting spit | + splitting split | + spoiling spoiled | + spoon-feeding spoon-fed | + spreading spread | + springing sprung | + stall-feeding stall-fed | + standing stood | + staving staved | + stealing stolen | + sticking stuck | + stinging stung | + stinking stunk | + strewing strewn | + striding stridden | + striking struck | + stringing strung | + striping stripped | + striving striven | + subletting sublet | + sunburning sunburned | + swearing sworn | + sweating sweat | + sweeping swept | + swelling swollen | + swiming swum | + swinging swung | + taking taken | + teaching taught | + tearing torn | + telecasting telecast | + telling told | + test-driving test-driven | + test-flying test-flown | + thinking thought | + thriving thrived | + throwing thrown | + thrusting thrust | + treading trodden | + troubleshooting troubleshot | + typecasting typecast | + typesetting typeset | + typewriting typewritten | + unbearing unborn | + unbending unbent | + unbinding unbound | + unbuilding unbuilt | + underbiding underbid | + underbuying underbought | + undercutting undercut | + underfeeding underfed | + undergoing undergone | + underlaying underlaid | + underletting underlet | + underlieing underlain | + underruning underrun | + underselling undersold | + undershooting undershot | + underspending underspent | + understanding understood | + undertaking undertaken | + underthrusting underthrust | + underwriting underwritten | + undoing undone | + undrawing undrawn | + unfreezing unfrozen | + unhanging unhung | + unhiding unhidden | + unholding unheld | + unknitting unknitted | + unlading unladen | + unlaying unlaid | + unlearning unlearned | + unmaking unmade | + unreeving unreeved | + unsaying unsaid | + unsewing unsewn | + unslinging unslung | + unspining unspun | + unsticking unstuck | + unstringing unstrung | + unswearing unsworn | + unteaching untaught | + unthinking unthought | + unweaving unwoven | + unwinding unwound | + unwriting unwritten | + upholding upheld | + upsetting upset | + vexing vexed | + waking woken | + waylaying waylaid | + wearing worn | + weaving woven | + weding wed | + weeping wept | + wetting wet | + wining won | + winding wound | + withdrawing withdrawn | + withholding withheld | + withstanding withstood | + wringing wrung | + writing written <en-trie-pasturise-regular-y> ::= - *aying 3ed | e.g., "slaying" to "slayed" - *eying 3ed | e.g., "preying" to "preyed" - *oying 3ed | e.g., "toying" to "toyed" - *ying 4ied e.g., "verifying" to "verified" + *aying 3ed | e.g., "slaying" to "slayed" + *eying 3ed | e.g., "preying" to "preyed" + *oying 3ed | e.g., "toying" to "toyed" + *ying 4ied e.g., "verifying" to "verified" <en-trie-pasturise-regular> ::= - *ing 3ed e.g., "smashing" to "smashed" + *ing 3ed e.g., "smashing" to "smashed"

§46. Adjective agreements. English doesn't inflect adjectives at all (let's not argue about "blond" @@ -3124,19 +3124,19 @@ and "blonde"), so the following are just stubs.

 <adjective-to-plural> ::=
-    *				0
+    *                0
 
 <adjective-to-masculine-singular> ::=
-    *				0
+    *                0
 
 <adjective-to-feminine-singular> ::=
-    *				0
+    *                0
 
 <adjective-to-masculine-plural> ::=
-    *				0
+    *                0
 
 <adjective-to-feminine-plural> ::=
-    *				0
+    *                0
 

§47. Grading of adjectives is more interesting. These spelling rules are taken @@ -3149,26 +3149,26 @@ rare in English adjectives.

 <adjective-to-comparative> ::=
-    good							better |
-    well							better |
-    bad								worse |
-    far								farther |
-    *e								1er |		 e.g. "close" to "closer"
-    *<bcdfghkmlnprstvwxyz>y			1ier |		 e.g. "ugly" to "uglier"
-    *<aeiou><aeiou><bcdfghkmlnprstvxyz>	0er |	 e.g. "cheap" to "cheaper", not "cheapper"
-    *<aeiou><bcdfghkmlnprstvxyz>	0+er |		 e.g. "fit" to "fitter"
-    *								0er
+    good                                  better |
+    well                                  better |
+    bad                                   worse |
+    far                                   farther |
+    *e                                    1er |      e.g. "close" to "closer"
+    *<bcdfghkmlnprstvwxyz>y               1ier |     e.g. "ugly" to "uglier"
+    *<aeiou><aeiou><bcdfghkmlnprstvxyz>   0er |      e.g. "cheap" to "cheaper" not "cheapper"
+    *<aeiou><bcdfghkmlnprstvxyz>          0+er |     e.g. "fit" to "fitter"
+    *                                     0er
 
 <adjective-to-superlative> ::=
-    good							best |
-    well							best |
-    bad								worst |
-    far								farthest |
-    *e								1est |
-    *<bcdfghkmlnprstvwxyz>y			1iest |
-    *<aeiou><aeiou><bcdfghkmlnprstvxyz>	0est |
-    *<aeiou><bcdfghkmlnprstvxyz>	0+est |
-    *								0est
+    good                                  best |
+    well                                  best |
+    bad                                   worst |
+    far                                   farthest |
+    *e                                    1est |
+    *<bcdfghkmlnprstvwxyz>y               1iest |
+    *<aeiou><aeiou><bcdfghkmlnprstvxyz>   0est |
+    *<aeiou><bcdfghkmlnprstvxyz>          0+est |
+    *                                     0est
 

§48. To the best of my knowledge there's no technical term for "the noun which @@ -3186,9 +3186,9 @@ sometimes less elegant, but never means the wrong thing.

 <adjective-to-quiddity> ::=
-    *ong							3ength |	 e.g. "strong" to "strength"
-    *<bcdfghkmlnprstvwxyz>y			1iness |	 e.g. "happy" to "happiness"
-    *								0ness
+    *ong                            3ength |     e.g. "strong" to "strength"
+    *<bcdfghkmlnprstvwxyz>y         1iness |     e.g. "happy" to "happiness"
+    *                               0ness
 

§49. English has almost no noun cases at all, with the only exceptions being @@ -3202,7 +3202,7 @@ case. We won't bother to distinguish gender: nominative | accusative <noun-declension> ::= - * <en-noun-declension-group> <en-noun-declension-tables> + * <en-noun-declension-group> <en-noun-declension-tables>

§50. And the sorting into groups sorts everything into "group 1", the only group: @@ -3210,7 +3210,7 @@ case. We won't bother to distinguish gender:

 <en-noun-declension-group> ::=
-    *			1
+    *            1
 
 <en-noun-declension-tables> ::=
     <en-noun-declension-uninflected>
@@ -3232,17 +3232,17 @@ don't distinguish nominative from accusative.
 
 
 <article-declension> ::=
-    *			<en-article-declension>
+    *           <en-article-declension>
 
 <en-article-declension> ::=
-    a			a a
+    a           a    a
                 some some |
-    the			the the |
-                the the
+    the         the  the
+                the  the
 
diff --git a/docs/inflections-module/P-htitm.html b/docs/inflections-module/P-htitm.html index bb11226f3..89d4475c1 100644 --- a/docs/inflections-module/P-htitm.html +++ b/docs/inflections-module/P-htitm.html @@ -89,8 +89,11 @@ module: InflectionsModule::end() just before it shuts down. (But just after, and just before, the corresponding calls to foundation.) +

§3. This module has no callback functions to modify its behaviour. +

+ diff --git a/docs/inflections-module/P-wtmd.html b/docs/inflections-module/P-wtmd.html index d598881f7..440f0a332 100644 --- a/docs/inflections-module/P-wtmd.html +++ b/docs/inflections-module/P-wtmd.html @@ -59,7 +59,7 @@

An overview of the inflections module's role and abilities.

-
+

§1. Prerequisites. The inflections module is a part of the Inform compiler toolset. It is presented as a literate program or "web". Before diving in: @@ -93,41 +93,47 @@ and the code for initialising them from Preform grammar is provided by Preform Utilities (in words).

-

§3. Though tries are, as just mentioned, created from Preform grammar, they're -parsed quite differently. The rules are as follows: +

§3. Though tries are, as just mentioned, created from Preform grammar, they are +parsed quite differently.

- +For example: +

+
     <fiddle-with-words> ::=
         <fiddle-with-exceptions> |
         ... <fiddle-with-irregular-endings> |
         ... <fiddle-with-regular-endings>
 
-

means try <fiddle-with-exceptions> first (on the whole word), then +

means try <fiddle-with-exceptions> first (on the whole text), then <fiddle-with-irregular-endings> (on the tail), and finally <fiddle-with-regular-endings> (also on the tail).

- +a digit at the start of the replacement text means "truncate by this many +letters and add...". The simplest possible instruction is 0 alone, which +means "truncate 0 letters and add nothing", and therefore leaves the text +unchanged. +

+ +

Some examples: +

+
     <pluralise> ::=
-        lead lead |
+        lead 0 |
         codex codices |
         *mouse 5mice
 
@@ -135,54 +141,200 @@ change.) Some examples: and "fieldmouse" as "fieldmice".

-

Designing a trie is not quite as easy as it looks. It looks as if this is a -sequence of tests to perform in succession, but it's better to think of the -rules all being performed at once. In general, if you need one inflection -rule to take precedence over another, put it in an earlier trie, rather than -putting it earlier in the same trie. +

The special character + after a digit means "double the last letter", so +that, for example, 0+er turns "big" to "bigger". In other positions, + +means "add another word", so for example 0+er+still turns "big" to "bigger +still". +

+ +

Designing a list of inflection rules is not quite as easy as it looks, because +these rules are not applied in succession: it's better to think of the rules +as all being performed at once. In general, if you need one inflection +rule to take precedence over another, put it in an earlier trie (in the list +of tries which includes this one), rather than putting it earlier in the same trie.

For the implementation of these rules, see Tries and Inflections.

-

§4. Once we have that general inflection machinery, most of what we need to -do becomes a simple matter of writing wrapper functions for tries. +

§6. Once we have that general inflection machinery, most of what we need to +do becomes a simple matter of writing wrapper functions for tries, and these +occupy the rest of Chapter 2: Simple Inflections.

-