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.

 

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:

 

  1. “Bobby hit the ball using the bat”
  2. “Bobby, using the bat, hit the ball”
  3. “Using the bat, Bobby hit the ball”

 

I wondered: how might we be able to generate each?

 

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.

 

That is,

 

hit<voice::active, tense::past, aspect::perfective, mood::indicative>(context, (Agent)Bobby, (Patient)ball, (Instrument)bat) --> “Bobby hit the ball using the bat”

hit<voice::active, tense::past, aspect::perfective, mood::indicative>(context, (Agent)Bobby, (Instrument)bat, (Patient)ball) --> “Bobby, using the bat, hit the ball”

hit<voice::active, tense::past, aspect::perfective, mood::indicative>(context, (Instrument)bat, (Agent)Bobby, (Patient)ball) --> “Using the bat, Bobby hit the ball”

 

or

 

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”

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”

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”

 

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)).

 

There are, of course, other approaches to consider and other possibilities to consider with respect to addressing the matter of outputting the example paraphrases.

 

Any thoughts on these topics?

 

 

Best regards,

Adam

 

[1] https://en.wikipedia.org/wiki/Don%27t_repeat_yourself

[2] https://en.wikipedia.org/wiki/Abstraction_principle_(computer_programming)

[3] https://en.wikipedia.org/wiki/Thematic_relation

 

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.

 

From: Adam Sobieski
Sent: Thursday, July 23, 2020 7:38 PM
To: General public mailing list for the discussion of Abstract Wikipedia (aka Wikilambda)
Subject: RE: Conjugation and Declension Functions

 

I had an idea about discovering, encoding and reusing patterns in languages that I would like to share with the group.

 

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.

 

Clause kick<V, T>(Context context, Noun agent, Noun patient)

{

  switch(V)

  {

    case voice::active:

      switch(T)

      {

        case tense::past:

        case tense::present:

          return join(" ", [

            agent,

            conjugate_en(“kick”, V, T, …),

            “the”,

            patient

          ]);

        case tense::future:

          return join(" ", [

            agent,

            “will”,

            conjugate_en(“kick”, V, T, …),

            “the”,

            patient

          ]);

        …

      }

    case voice::passive:

      switch(T)

      {

        case tense::past:

          return join(" ", [

            “the”,

            patient,

            “was”,

            conjugate_en(“kick”, V, T, …),

            “by”

            agent

          ]);

        case tense::present:

          return join(" ", [

            “the”,

            patient,

            “is”,

            “being”,

            conjugate_en(“kick”, V, T, …),

            “by”

            agent

          ]);

       …

     }

  }

}

 

and

 

kick<voice::active, tense::past>(context, Bobby, ball) returns “Bobby kicked the ball”.

 

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:

 

Clause pattern123<V, T>(Context context, Verb verb, Noun agent, Noun patient)

{

  switch(V)

  {

    case voice::active:

      switch(T)

      {

        case tense::past:

        case tense::present:

          return join(" ", [

            agent,

            conjugate_en(verb, V, T, …),

            “the”,

            patient

          ]);

        case tense::future:

          return join(" ", [

            agent,

            “will”,

            conjugate_en(verb, V, T, …),

            “the”,

            patient

          ]);

        …

      }

    case voice::passive:

      switch(T)

      {

        case tense::past:

          return join(" ", [

            “the”,

            patient,

            “was”,

            conjugate_en(verb, V, T, …),

            “by”

            agent

          ]);

        case tense::present:

          return join(" ", [

            “the”,

            patient,

            “is”,

            “being”,

           conjugate_en(verb, V, T, …),

            “by”

            agent

          ]);

       …

     }

  }

}

 

We could then simply express that the verb “to kick” is an instance of pattern pattern123 with something resembling:

 

Clause kick<V, T>(Context context, Noun agent, Noun patient)

{

  pattern123<V, T>(context, new Verb(“kick”, …), agent, patient);

}

 

or

 

Clause kick<V, T>(Context context, Noun agent, Noun patient)

{

  pattern123<V, T>(context, getVerb(“https://…#kick”), agent, patient);

}

 

and this pattern could be reused for a large number of verbs.

 

This use of patterns should extend to scenarios where there are more parameters for other thematically-related nouns:

 

Clause kick<V, T>(Context context, Noun agent, Noun patient, Noun instrument)

{

  pattern1234<V, T>(context, new Verb(“kick”, …), agent, patient, instrument);

}

 

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>(…)).

 

In conclusion, with generic programming and functions for conjugation and declension, we have expressiveness with which to discover, encode and reuse language-specific patterns.

 

 

Best regards,

Adam Sobieski