<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Al,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Inverse parsing makes sense. The parse tree in your example is expressive. Your example also shows a means of describing nouns or noun phrases as being Wikidata entities which would facilitate producing hyperlinks in resultant articles.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It could be that some of the natural language generation functions on Wikilambda will, instead of concatenating strings, work with trees or tree-based data. The classes for things like phrases, clauses, sentences, and so forth, could be
 tree-based or contain tree-based data. The matter could be one of producing intricate parse trees (or using an equivalent object model) from Wikidata data to then inverse parse into natural language sentences.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best regards,</p>
<p class="MsoNormal">Adam</p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:grounderuk@gmail.com">Grounder UK</a><br>
<b>Sent: </b>Saturday, July 25, 2020 8:12 PM<br>
<b>To: </b><a href="mailto:abstract-wikipedia@lists.wikimedia.org">abstract-wikipedia@lists.wikimedia.org</a><br>
<b>Subject: </b>[Abstract-wikipedia] Conjugation and Declension Functions (Adam Sobieski)</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">You're welcome, Adam.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Far be it from me to disagree with Reiter and Dale (and I don't). I find it odd, however, that you put "<span style="font-size:10.0pt">hit<…>(Context, Array)". </span>I wonder how, in our Wikipedic context, we get the idea of a verb? And
 why do we put it outside our array?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The reality is that Wikipedias are about things, in the main: people, places, objects, types and historical events. These things have properties and different types of involvement in events, but I guess more than half the time we have to
 invent (or select or find...) a suitable verb for the set of objects we find to be related (from the claims in Wikidata). If English didn't demand a finite verb, our Wikipedia would manage perfectly well without them, just as Wikidata does (although they "lurk"
 within Properties).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">To my way of thinking, if there is any substance of note in the sense of the verb, it must be in the array of Senses (never mind their lexical form). Of course, you might reason that we start with an array of "involved senses" and infer
 the verb, which we can then inflect. It's part of Lexicalization rather than Realization, in other words. Maybe that is generally so, but I am not convinced that we should immediately assume that it must be so in our Wikipedic context.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">For me, in any event, Realization in our context is just the final transformation of a near-final representation of our content, so I wouldn't expect it to change the sequence of ideas or change around syntactic roles. If you're deriving
 roles and sequences, then you're doing Lexicalization (or you're at a higher level) and you won't generally know what the verb is going to be at that stage (how could you?). It could be "strike", "hit" or "bat", for example. And the involvement of a bat in
 our array might be a good reason to choose the verb "bat" or a good reason to avoid it, depending on the particular context. If we choose "bat" as the verb, we will probably also drop it from the instrument role because that role is implied by the verb ("hit
 with a bat"). That "fact" will also keep us from choosing the verb "bat" if we need to refer to the bat as an object (to specify that it was her father's bat, for example). If the verb "bat" is going to subsume the instrument role, the instrument must be wholly
 indefinite ("hit with 'any old' bat" rather than "hit with one of the bats").<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Returning to Reiter and Dale, I think it makes sense to view this problem in reverse, as inverse parsing. As they say, you can parse the three forms into a single "logical form" (which some might call "abstract content") and there must
 be some loss of information in this process, since we cannot guarantee that we will get back to the form we started with if we invert the parsing. It is this lost information that we need to retain when we have parsed (for future reference) and to have available
 before we proceed to Realize (or "render"). Our logical "manual of style" is what we might use to derive the missing information that we must have available, if we cannot infer it from the selected Wikidata content.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">To begin again at the end, I might say we can parse "Bobby batted the ball" as something like: Sentence< {comment: here, Sentence = Subject + Verb Phrase}<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Subject< Noun Phrase< Noun <Alias<"Bobby">, entity<Q???>> >> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">+ Verb Phrase< {comment: here, Verb Phrase = Verb + Instrument + Direct Object}<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Verb< Sense<"hit">, Tense<simple past>, Voice<active>> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">+ Instrument< Noun Phrase< Noun< Sense<"bat">> + Determiner<indefinite>> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">+ Direct Object< Noun Phrase< Noun< Sense<"ball">> + Determiner<definite>> >>. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Assuming I've parsed that correctly (and it's been a few years since I had to), we can assert that this "logical form" shall be valid input into our Realization function. What do we get back? "Bobby hit the ball with a bat". I had to cheat,
 of course. The reason, I suppose, is that the subsumed noun phrase was prepositional and non-prepositional noun phrases, in English, tend to attach themselves to their verbs ("I gave him it" versus "I gave it to him", for example). So when I surfaced the subsumed
 instrumental, "with a bat" (which is more interpretation than parsing), the result was naturally in the wrong order, coming between the verb and the existing non-prepositional noun phrase, "the ball". The order shouldn't matter to the renderer, unless it's
 explicit. But I did say that I wouldn't expect Realization to change the sequence of ideas, and then it had to because "Bobby hit with a bat the ball" is un-English in any unfanciful context (although perfectly understandable). Full disclosure, as they say!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">So, if interpretive parsing surfaces subsumed elements, some Lexicalization may be required to establish a "logical form" that is valid input into Realization. Alternatively, we might consider that to occur within the inverse of Referring
 Expression Generation, since it is loosely analogous to surfacing nouns from pronouns and might be considered to be a kind of anaphora (locally, at least, it is likely to be exophoric: "batted" implies an unspecified bat, as discussed above, but surfacing
 it renders it endophoric, if you'll forgive the pun, and thus anaphoric at that level).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">By the way, Reiter claims to have written or admits to writing the main articles on natural language generation in the English Wikipedia. You can find the links in: <a href="https://meta.wikimedia.org/wiki/Abstract_Wikipedia/Related_and_previous_work/Natural_language_generation">https://meta.wikimedia.org/wiki/Abstract_Wikipedia/Related_and_previous_work/Natural_language_generation</a>.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Best regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Al.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
On Saturday, 25 July 2020, <<a href="mailto:abstract-wikipedia-request@lists.wikimedia.org" target="_blank">abstract-wikipedia-request@lists.wikimedia.org</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:4.8pt">Send Abstract-Wikipedia mailing list submissions to<br>
        <a href="mailto:abstract-wikipedia@lists.wikimedia.org" target="_blank">abstract-wikipedia@lists.wikimedia.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://lists.wikimedia.org/mailman/listinfo/abstract-wikipedia" target="_blank">
https://lists.wikimedia.org/mailman/listinfo/abstract-wikipedia</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:abstract-wikipedia-request@lists.wikimedia.org" target="_blank">
abstract-wikipedia-request@lists.wikimedia.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:abstract-wikipedia-owner@lists.wikimedia.org" target="_blank">
abstract-wikipedia-owner@lists.wikimedia.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Abstract-Wikipedia digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: Conjugation and Declension Functions (Adam Sobieski)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sat, 25 Jul 2020 17:43:55 +0000<br>
From: Adam Sobieski <<a href="mailto:adamsobieski@hotmail.com" target="_blank">adamsobieski@hotmail.com</a>><br>
To: "General public mailing list for the discussion of Abstract<br>
        Wikipedia (aka Wikilambda)" <<a href="mailto:abstract-wikipedia@lists.wikimedia.org" target="_blank">abstract-wikipedia@lists.wikimedia.org</a>><br>
Subject: Re: [Abstract-wikipedia] Conjugation and Declension Functions<br>
Message-ID:<br>
        <<a href="mailto:CH2PR12MB41848A048AE721573F59A218C5740@CH2PR12MB4184.namprd12.prod.outlook.com" target="_blank">CH2PR12MB41848A048AE721573F59A218C5740@CH2PR12MB4184.namprd12.prod.outlook.com</a>><br>
<br>
Content-Type: text/plain; charset="windows-1252"<br>
<br>
Thank you all for the comments and feedback thus far.<br>
<br>
<br>
<br>
I would like to indicate that we could also utilize the expressiveness of JavaScript/TypeScript for array literals with object literal elements. In this alternative approach, arguments could be placed into an array of objects which each attach a thematic role
 to an argument. “Bobby”, “ball” and “bat” could be objects of type Noun, and we could pass to a function an array literal of object literals to get at the desired concepts of: (1) sequence, (2) roles, (3) values. That is rather the matter: attaching thematic
 roles to elements of a sequence of arguments.<br>
<br>
<br>
<br>
To the example pseudocode:<br>
<br>
<br>
<br>
Noun Bobby;<br>
<br>
Noun ball;<br>
<br>
Noun bat;<br>
<br>
<br>
<br>
hit<voice::active, tense::past, aspect::perfective, mood::indicative>(context, [ {role: ‘agent’, value: Bobby}, {role: ‘patient’, value: ball}, {role: ‘instrument’, value: bat} ]) --> “Bobby hit the ball with the bat”<br>
<br>
hit<voice::active, tense::past, aspect::perfective, mood::indicative>(context, [ {role: ‘agent’, value: Bobby}, {role: ‘instrument’, value: bat}, {role: ‘patient’, value: ball} ]) --> “Bobby, with the bat, hit the ball”<br>
<br>
hit<voice::active, tense::past, aspect::perfective, mood::indicative>(context, [ {role: ‘instrument’, value: bat}, {role: ‘agent’, value: Bobby}, {role: ‘patient’, value: ball} ]) --> “With the bat, Bobby hit the ball”<br>
<br>
<br>
<br>
or, if the grammatical arguments (voice, tense, aspect, mood) are properties of the context object:<br>
<br>
<br>
<br>
hit(context, [ {role: ‘agent’, value: Bobby}, {role: ‘patient’, value: ball}, {role: ‘instrument’, value: bat} ]) --> “Bobby hit the ball with the bat”<br>
<br>
hit(context, [ {role: ‘agent’, value: Bobby}, {role: ‘instrument’, value: bat}, {role: ‘patient’, value: ball} ]) --> “Bobby, with the bat, hit the ball”<br>
<br>
hit(context, [ {role: ‘instrument’, value: bat}, {role: ‘agent’, value: Bobby}, {role: ‘patient’, value: ball} ]) --> “With the bat, Bobby hit the ball”<br>
<br>
<br>
<br>
A downside would be that the function signatures would resemble:<br>
<br>
<br>
<br>
hit<…>(Context, Array)<br>
<br>
<br>
<br>
or<br>
<br>
<br>
<br>
hit<…>(Context, Array<RoleNounPair>)<br>
<br>
<br>
<br>
An upside would be expressiveness with which to indicate desired output paraphrases.<br>
<br>
<br>
<br>
These topics are discussed in Building Natural Language Generation Systems by Reiter and Dale [1], in chapter 6 on Surface Realization, in section 6.8 on Bidirectional Grammars, pages 194 – 195, where the authors indicate that while “a parser might produce
 the same logical form for the following three sentences:<br>
<br>
<br>
<br>
  1.  Mary gave John a ball.<br>
  2.  Mary gave a ball to John.<br>
  3.  John was given a ball by Mary.<br>
<br>
<br>
<br>
“The input to a realizer, however, should explicitly provide a means of choosing among these forms; the alternative is to choose at random.” (as noted, another alternative is to select using a manual of style).<br>
<br>
<br>
<br>
The authors also indicate that Winograd [2] provided a list of paraphrases for consideration:<br>
<br>
<br>
<br>
  1.  Jon bought a painting for Vina.<br>
  2.  Jon bought Vina a painting.<br>
  3.  Vina was bought a painting by Jon.<br>
  4.  What Jon bought Vina was a painting.<br>
  5.  What Vina was bought by Jon was a painting.<br>
  6.  It was a painting that Jon bought for Vina.<br>
  7.  It was Jon that bought Vina a painting.<br>
  8.  It was Vina that Jon bought a painting for.<br>
<br>
<br>
<br>
On the topic of “a” or “the”, definite or indefinite noun phrases, we can note a discussion in Reiter and Dale [1], section 5.4.2, on page 145. That is another important discussion topic.<br>
<br>
<br>
<br>
In the set of approaches under discussion, by making use of grammatical arguments (e.g. voice, tense, aspect, mood) and by placing thematic roles on elements of a sequence of arguments, we have an expressiveness beyond that of predicate calculus with which
 to distinguish paraphrases.<br>
<br>
<br>
<br>
<br>
<br>
Best regards,<br>
<br>
Adam<br>
<br>
<br>
<br>
[1] Reiter, Ehud, and Robert Dale. Building natural language generation systems. Cambridge university press, 2000.<br>
<br>
[2] Winograd, Terry. "Language as a cognitive process." (1983).<br>
<br>
From: Adam Sobieski<mailto:<a href="mailto:adamsobieski@hotmail.com" target="_blank">adamsobieski@hotmail.com</a>><br>
Sent: Friday, July 24, 2020 7:07 PM<br>
To: General public mailing list for the discussion of Abstract Wikipedia (aka Wikilambda)<mailto:<a href="mailto:abstract-wikipedia@lists.wikimedia.org" target="_blank">abstract-wikipedia@lists.wikimedia.org</a>><br>
Subject: Re: [Abstract-wikipedia] Conjugation and Declension Functions<br>
<br>
In addition to broaching the discovery, encoding and reuse of language-specific patterns, which I view as a discussion topic when comparing and contrasting approaches (see: the DRY principle [1] and the abstraction principle [2]), and indicating how conjugation
 and declension functions would facilitate the discovery, encoding and reuse of these patterns, I would like to share some topics which arose as I explored adding the thematic relation [3] of instrument to the agent-patient pair.<br>
<br>
When exploring how best to add the thematic relation of instrument to the agent-patient pair (e.g. adding “using the bat” to “Bobby hit the ball”), I observed that, for the same input grammatical arguments, there was a set of possible output paraphrases:<br>
<br>
<br>
  1.  “Bobby hit the ball using the bat”<br>
  2.  “Bobby, using the bat, hit the ball”<br>
  3.  “Using the bat, Bobby hit the ball”<br>
<br>
I wondered: how might we be able to generate each?<br>
<br>
One possibility is indicated. There could be a type for each thematic relation [3]. Then, using explicit type conversions to these types, we could have different functions for different sequences of input arguments.<br>
<br>
That is,<br>
<br>
hit<voice::active, tense::past, aspect::perfective, mood::indicative>(context, (Agent)Bobby, (Patient)ball, (Instrument)bat) --> “Bobby hit the ball using the bat”<br>
hit<voice::active, tense::past, aspect::perfective, mood::indicative>(context, (Agent)Bobby, (Instrument)bat, (Patient)ball) --> “Bobby, using the bat, hit the ball”<br>
hit<voice::active, tense::past, aspect::perfective, mood::indicative>(context, (Instrument)bat, (Agent)Bobby, (Patient)ball) --> “Using the bat, Bobby hit the ball”<br>
<br>
or<br>
<br>
hit<voice::active, tense::past, aspect::perfective, mood::indicative>(context, Bobby as Agent, ball as Patient, bat as Instrument) --> “Bobby hit the ball using the bat”<br>
hit<voice::active, tense::past, aspect::perfective, mood::indicative>(context, Bobby as Agent, bat as Instrument, ball as Patient) --> “Bobby, using the bat, hit the ball”<br>
hit<voice::active, tense::past, aspect::perfective, mood::indicative>(context, bat as Instrument, Bobby as Agent, ball as Patient) --> “Using the bat, Bobby hit the ball”<br>
<br>
These functions could each wrap the use of patterns (as indicated in previous email) and attempt to realize output sentences utilizing the arguments in the same sequence in which they were provided. This would, however, mean that the callers of the functions
 would be responsible for “shuffling” the input arguments to express the desired paraphrase ((1), (2), (3)).<br>
<br>
There are, of course, other approaches to consider and other possibilities to consider with respect to addressing the matter of outputting the example paraphrases.<br>
<br>
Any thoughts on these topics?<br>
<br>
<br>
Best regards,<br>
Adam<br>
<br>
[1] <a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself" target="_blank">
https://en.wikipedia.org/wiki/Don%27t_repeat_yourself</a><br>
[2] <a href="https://en.wikipedia.org/wiki/Abstraction_principle_(computer_programming)" target="_blank">
https://en.wikipedia.org/wiki/Abstraction_principle_(computer_programming)</a><br>
[3] <a href="https://en.wikipedia.org/wiki/Thematic_relation" target="_blank">https://en.wikipedia.org/wiki/Thematic_relation</a><br>
<br>
P.S.: We could also put the grammatical arguments on the context object (context.voice, context.tense, context.aspect, context.mood, et cetera) and then make use of generic parameters for other uses.<br>
<br>
From: Adam Sobieski<mailto:<a href="mailto:adamsobieski@hotmail.com" target="_blank">adamsobieski@hotmail.com</a>><br>
Sent: Thursday, July 23, 2020 7:38 PM<br>
To: General public mailing list for the discussion of Abstract Wikipedia (aka Wikilambda)<mailto:<a href="mailto:abstract-wikipedia@lists.wikimedia.org" target="_blank">abstract-wikipedia@lists.wikimedia.org</a>><br>
Subject: RE: Conjugation and Declension Functions<br>
<br>
<br>
I had an idea about discovering, encoding and reusing patterns in languages that I would like to share with the group.<br>
<br>
<br>
<br>
The following is rough-draft pseudocode for a function with which to generate sentences for the verb “to kick”. The function has generic parameters for voice and tense and parameters for context, agent and patient.<br>
<br>
<br>
<br>
Clause kick<V, T>(Context context, Noun agent, Noun patient)<br>
<br>
{<br>
<br>
  switch(V)<br>
<br>
  {<br>
<br>
    case voice::active:<br>
<br>
      switch(T)<br>
<br>
      {<br>
<br>
        case tense::past:<br>
<br>
        case tense::present:<br>
<br>
          return join(" ", [<br>
<br>
            agent,<br>
<br>
            conjugate_en(“kick”, V, T, …),<br>
<br>
            “the”,<br>
<br>
            patient<br>
<br>
          ]);<br>
<br>
        case tense::future:<br>
<br>
          return join(" ", [<br>
<br>
            agent,<br>
<br>
            “will”,<br>
<br>
            conjugate_en(“kick”, V, T, …),<br>
<br>
            “the”,<br>
<br>
            patient<br>
<br>
          ]);<br>
<br>
        …<br>
<br>
      }<br>
<br>
    case voice::passive:<br>
<br>
      switch(T)<br>
<br>
      {<br>
<br>
        case tense::past:<br>
<br>
          return join(" ", [<br>
<br>
            “the”,<br>
<br>
            patient,<br>
<br>
            “was”,<br>
<br>
            conjugate_en(“kick”, V, T, …),<br>
<br>
            “by”<br>
<br>
            agent<br>
<br>
          ]);<br>
<br>
        case tense::present:<br>
<br>
          return join(" ", [<br>
<br>
            “the”,<br>
<br>
            patient,<br>
<br>
            “is”,<br>
<br>
            “being”,<br>
<br>
            conjugate_en(“kick”, V, T, …),<br>
<br>
            “by”<br>
<br>
            agent<br>
<br>
          ]);<br>
<br>
       …<br>
<br>
     }<br>
<br>
  }<br>
<br>
}<br>
<br>
<br>
<br>
and<br>
<br>
<br>
<br>
kick<voice::active, tense::past>(context, Bobby, ball) returns “Bobby kicked the ball”.<br>
<br>
<br>
<br>
In English, most combinations of tense, aspect, mood and voice are expressed periphrastically, using constructions with auxiliary verbs. After implementing a number of these for similar verbs, per the above example, we would notice a pattern. That pattern could
 be expressed as something resembling:<br>
<br>
<br>
<br>
Clause pattern123<V, T>(Context context, Verb verb, Noun agent, Noun patient)<br>
<br>
{<br>
<br>
  switch(V)<br>
<br>
  {<br>
<br>
    case voice::active:<br>
<br>
      switch(T)<br>
<br>
      {<br>
<br>
        case tense::past:<br>
<br>
        case tense::present:<br>
<br>
          return join(" ", [<br>
<br>
            agent,<br>
<br>
            conjugate_en(verb, V, T, …),<br>
<br>
            “the”,<br>
<br>
            patient<br>
<br>
          ]);<br>
<br>
        case tense::future:<br>
<br>
          return join(" ", [<br>
<br>
            agent,<br>
<br>
            “will”,<br>
<br>
            conjugate_en(verb, V, T, …),<br>
<br>
            “the”,<br>
<br>
            patient<br>
<br>
          ]);<br>
<br>
        …<br>
<br>
      }<br>
<br>
    case voice::passive:<br>
<br>
      switch(T)<br>
<br>
      {<br>
<br>
        case tense::past:<br>
<br>
          return join(" ", [<br>
<br>
            “the”,<br>
<br>
            patient,<br>
<br>
            “was”,<br>
<br>
            conjugate_en(verb, V, T, …),<br>
<br>
            “by”<br>
<br>
            agent<br>
<br>
          ]);<br>
<br>
        case tense::present:<br>
<br>
          return join(" ", [<br>
<br>
            “the”,<br>
<br>
            patient,<br>
<br>
            “is”,<br>
<br>
            “being”,<br>
<br>
           conjugate_en(verb, V, T, …),<br>
<br>
            “by”<br>
<br>
            agent<br>
<br>
          ]);<br>
<br>
       …<br>
<br>
     }<br>
<br>
  }<br>
<br>
}<br>
<br>
<br>
We could then simply express that the verb “to kick” is an instance of pattern pattern123 with something resembling:<br>
<br>
<br>
<br>
Clause kick<V, T>(Context context, Noun agent, Noun patient)<br>
<br>
{<br>
<br>
  pattern123<V, T>(context, new Verb(“kick”, …), agent, patient);<br>
<br>
}<br>
<br>
or<br>
<br>
<br>
Clause kick<V, T>(Context context, Noun agent, Noun patient)<br>
<br>
{<br>
<br>
  pattern123<V, T>(context, getVerb(“https://…#kick”), agent, patient);<br>
<br>
}<br>
<br>
and this pattern could be reused for a large number of verbs.<br>
<br>
This use of patterns should extend to scenarios where there are more parameters for other thematically-related nouns:<br>
<br>
<br>
<br>
Clause kick<V, T>(Context context, Noun agent, Noun patient, Noun instrument)<br>
<br>
{<br>
<br>
  pattern1234<V, T>(context, new Verb(“kick”, …), agent, patient, instrument);<br>
<br>
}<br>
<br>
For English, there might be more generic parameters than those for voice and tense; we could add those for aspect and mood (e.g. pattern1234<V, T, A, M>(…)).<br>
<br>
In conclusion, with generic programming and functions for conjugation and declension, we have expressiveness with which to discover, encode and reuse language-specific patterns.<br>
<br>
<br>
Best regards,<br>
Adam Sobieski<br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.wikimedia.org/pipermail/abstract-wikipedia/attachments/20200725/b1d38390/attachment.html" target="_blank">https://lists.wikimedia.org/pipermail/abstract-wikipedia/attachments/20200725/b1d38390/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Abstract-Wikipedia mailing list<br>
<a href="mailto:Abstract-Wikipedia@lists.wikimedia.org" target="_blank">Abstract-Wikipedia@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/abstract-wikipedia" target="_blank">https://lists.wikimedia.org/mailman/listinfo/abstract-wikipedia</a><br>
<br>
<br>
------------------------------<br>
<br>
End of Abstract-Wikipedia Digest, Vol 1, Issue 86<br>
*************************************************<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>