EnVerbGen English verb-generating module of the

first working Artificial General Intelligence

ghost.pl for webservers -- MindForth for robots


1. Diagram of the EnVerbGen Mind-Module

       
  /^^^^^^^^^^^\EnVerbGen Creates English Verb-Form/^^^^^^^^^^^\
 /   EYE       \            _________________    /    EAR      \
|               |CONCEPTS  /    Volition     \  |  ___________  |
|   _______     |   | | |  \_________________/  | / MindBoot  \ |
|  / old   \    |   | | |              _|____   || memory vault||
| / image   \!!!|!!!|!|!|             /      \  ||             ||
| \ recog   /---|---|-|-+            (EnThink ) || "STUDENTS"  ||
|  \_______/    |   |S| |             \______/  || "READ"      ||
|               |   |T| |          _____|______ || "BOOKS"     ||
|               |   |U| | _____   ( Indicative )| \___________/ |
|               |   |D|B|| En- \   \__________/ |               |
|   visual      |  R|E|O|| Noun-\  / ___|____   |               |
|               |  E|N|O|| Phrase\/ / EnVerb-\  |  I            |
|   memory      |  A|T|K||_______/ /  Phrase  \ |  READ        |
|               |  D|S|S|          \__________/ |  BOOKS        |
|   channel     |   | | |   _________|_____     |               |
|               |   | | |  /   EnVerbGen   \    |  ANNA         |
|               |   | | | (      READS      )   |  READS        |
|   _______     |   | | |  \_______________/    |  BOOKS        |
|  /new    \    |   | | | ___|_____   ___|_____ |               |
| / percept \   |   |_|_||AudBuffer| |OutBuffer||               |
| \ engram  /---|---(Psy)|READ     | |     READ||               |
|  \_______/    |    \_/ |_________| |_________||               |


2. Purpose of the EnVerbGen Module

The purpose of EnVerbGen is to create an English verb-form not directly available in auditory memory when the AI Mind knows the particular English verb and its forms of conjugation, but does not have the one particular verb-form held in auditory memory.


3. Algorithm of the EnVerbGen Module of Strong AI with NLU

3.A. EnVerbGen is called from the EnVerbPhrase module.

If no recall-vector is found to retrieve the parameter-specified verb-form from auditory memory, EnVerbPhrase not only calls EnVerbGen to supply the missing form, but also prevents the attempt to speak something else after the generation of the form.

3.B. EnVerbGen typically adds an "S" to end the first person singular form of an English verb.

3.C. EnVerbGen adds "-ES" if the stem of the English verb ends in "CH" or "SH" or "ZZ" or "X".

When the InFerence module asks the human user to confirm or negate a logical inference and the human user answers a question with "yes" or "no", such as "Does Einstein teach students?", the AI may state the denied inference as "EINSTEIN DOES NOT TEACH STUDENTS," but may need to call EnVerbGen to state "EINSTEIN TEACHES STUDENTS."

3.D. As an AI Mind uses EnVerbGen to create and store missing verb-forms, the availability of the generated forms in memory should prevent future callings of EnVerbGen to create the no-longer-missing verb-form.


4. Code of EnVerbGen() from ghost296.pl AI source code in Perl


sub EnVerbGen() {  # http://ai.neocities.org/EnVerbGen.html
  if ($audbase == 0 && $verbpsi > 0) {  # 2018-10-20: for lack of starting point...
    for (my $i=$t; $i>$midway; $i--) {  # 2018-10-20: search backwards in time.
      my @k=split(',',$psy[$i]);  # 2018-10-20: inspect @psy flag-panel.
      if ($k[1]==$verbpsi && $k[14] > 0) {  # 2018-10-20: verb with recall-vector?
        $audbase = $k[14];  # 2018-10-20: initial base-time for generating verb-form
        last;  # 2018-10-20: one example is enough.
      }  # 2018-10-20: end of test for modificand verb and auditory engram
    }  # 2018-10-20: end of backwards loop in search of audbase starting point.
  }  # 2018-10-20: end of test for lack of $audbase and presence of $verbpsi.
  my $binc = 0;  # 2018-10-09: Buffer-INCrement counter used only locally. 
   # 2018-10-08: use AudBuffer() and OutBuffer() to modify English verb-forms.
  my @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #01
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #02
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #03
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #04
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #05
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #06
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #07
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #08
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #09
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #10
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #11
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #12
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #13
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #14
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #15
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  @aud=split(',',$ear[$audbase]);  # 2018-10-09: @ear word-engram #16
  if ($aud[0] ne " ") { $abc = $aud[0]; AudBuffer(); $audbase++ } 
  do {  # 2018-10-09: next loop uses OutBuffer();
    OutBuffer();  # 2018-10-09
    if ($binc == 1) {   # 2018-10-09: 
      if ($b01 ne "") { print "$b01"; $idea = "$idea" . "$b01"; }  # 2018-10-09
    }  # 2016apr23: end of outputting character and concatenating for ReEntry().
    if ($binc == 2) {   # 2018-10-09
      if ($b02 ne "") { print "$b02"; $idea = "$idea" . "$b02"; }  # 2018-10-09
    }  # 2016apr23: end of outputting character and concatenating for ReEntry().
    if ($binc == 3) {   # 2018-10-09
      if ($b03 ne "") { print "$b03"; $idea = "$idea" . "$b03"; }  # 2018-10-09
    }  # 2016apr24: end of outputting character and concatenating for ReEntry().
    if ($binc == 4) { # 2018-10-09
      if ($b04 ne "") { print "$b04"; $idea = "$idea" . "$b04"; }  # 2018-10-09
    }  # 2016apr24: end of outputting character and concatenating for ReEntry().
    if ($binc == 5) {   # 2018-10-09
      if ($b05 ne "") { print "$b05"; $idea = "$idea" . "$b05"; }  # 2018-10-09
    }  # 2016apr24: end of outputting character and concatenating for ReEntry().
    if ($binc == 6) {   # 2018-10-09
      if ($b06 ne "") { print "$b06"; $idea = "$idea" . "$b06"; }  # 2018-10-09
    }  # 2016apr24: end of outputting character and concatenating for ReEntry().
    if ($binc == 7) { # 2018-10-09
      if ($b07 ne "") { print "$b07"; $idea = "$idea" . "$b07"; }  # 2018-10-09
    }  # 2016apr24: end of outputting character and concatenating for ReEntry().
    if ($binc == 8) { # 2018-10-09
      if ($b08 ne "") { print "$b08"; $idea = "$idea" . "$b08"; }  # 2018-10-09
    }  # 2016apr24: end of outputting character and concatenating for ReEntry().
    if ($binc == 9) {  # 2018-10-09
      if ($b09 ne "") { print "$b09"; $idea = "$idea" . "$b09"; }  # 2018-10-09
    }  # 2016apr24: end of outputting character and concatenating for ReEntry().
    if ($binc == 10) {  # 2018-10-09
      if ($b10 ne "") { print "$b10"; $idea = "$idea" . "$b10"; }  # 2018-10-09
    }  # 2016apr23: end of outputting character and concatenating for ReEntry().
    if ($binc == 11) {  # 2018-10-09 
      if ($b11 ne "") { print "$b11"; $idea = "$idea" . "$b11"; }  # 2018-10-09
    }  # 2016apr23: end of outputting character and concatenating for ReEntry().
    if ($binc == 12) {  # 2018-10-09 
      if ($b12 ne "") { print "$b12"; $idea = "$idea" . "$b12"; }  # 2018-10-09
    }  # 2016apr23: end of outputting character and concatenating for ReEntry().
    if ($binc == 13) {  # 2018-10-09 
      if ($b13 ne "") { print "$b13"; $idea = "$idea" . "$b13"; }  # 2018-10-09
    }  # 2016apr23: end of outputting character and concatenating for ReEntry().
    if ($binc == 14) {  # 2018-10-09 
      if ($b14 ne "") { print "$b14"; $idea = "$idea" . "$b14"; }  # 2018-10-09
    }  # 2018-10-09: end of outputting character and concatenating for ReEntry().
    if ($binc == 15) {  # 2018-10-09 
      if ($b15 ne "") { print "$b15"; $idea = "$idea" . "$b15"; }  # 2018-10-09
    }  # 2018-10-09: end of outputting character and concatenating for ReEntry().
    if ($binc == 16) {  # 2018-10-09 
      if ($b16 ne "") { print "$b16"; $idea = "$idea" . "$b16"; }  # 2018-10-09
    }  # 2018-10-09: end of outputting character and concatenating for ReEntry().
    $binc++;  # 2018-10-09: OutBuffer() "b" increment
  } while ($binc < 17);  # 2018-10-09: while inspecting OutBuffer()
  $c01=""; $c02=""; $c03=""; $c04="";  # 2018-10-09: clear out the AudBuffer()
  $c05=""; $c06=""; $c07=""; $c08="";  # 2018-10-09: clear out the AudBuffer()
  $c09=""; $c10=""; $c11=""; $c12="";  # 2018-10-09: clear out the AudBuffer()
  $c13=""; $c14=""; $c15=""; $c16="";  # 2018-10-09: clear out the AudBuffer()
  $binc = 0;  # 2018-10-09: Reset the b-increment variable after use. 
  if ($prsn == 1) {  # 2018-10-20: first person;
    if ($snu == 1) {  # 2018-10-09: subject-number parameter;
      $pho = " ";  # 2018-10-09: 
      print "$pho";  # 2018-10-09: after stem, output this inflection.
      $idea = "$idea" . "$pho";  # 2018-10-09: concatenate for ReEntry()
    }  # 2018-10-09: end of test for singular subject-number;
    if ($snu == 2) {  # 2018-10-09: subject-number parameter;
      $pho = " ";  # 2018-10-09:
      print "$pho";  # 2018-10-09: after stem, output this inflection.
      $idea = "$idea" . "$pho";  # 2018-10-09: concatenate for ReEntry()
      $pho = "\x8C";  # 2018-10-09
      print "$pho";  # 2018-10-09: after stem, output this inflection.
      $idea = "$idea" . "$pho";  # 2018-10-09: concatenate for ReEntry()
    }  # 2018-10-09: end of test for plural subject-number;
  }  # 2018-10-09: end of test for first-person; 
  if ($prsn == 2) {  # 2018-10-20: second person;
    if ($snu == 1) {  # 2018-10-09: subject-number parameter;
      $pho = " ";  # 2018-10-09:
      print "$pho";  # 2018-10-09: after stem, output this inflection.
      $idea = "$idea" . "$pho";  # 2018-10-09: concatenate for ReEntry()
      $pho = " ";  # 2018-10-09:
      print "$pho";  # 2018-10-09: after stem, output this inflection.
      $idea = "$idea" . "$pho";  # 2018-10-09: concatenate for ReEntry()
      $pho = " ";  # 2018-10-09:
      print "$pho ";  # 2018-10-09: after stem, output this inflection.
      $idea = "$idea" . "$pho";  # 2018-10-09: concatenate for ReEntry()
    }  # 2018-10-09: end of test for singular subject-number;
    if ($snu == 2) {  # 2018-10-09: subject-number parameter;
      $pho = " ";  # 2018-10-09:
      print "$pho";  # 2018-10-09: after stem, output this inflection.
      $idea = "$idea" . "$pho";  # 2018-10-09 concatenate for ReEntry()
      $pho = " ";  # 2018-10-09:
      print "$pho";  # 2018-10-09: after stem, output this inflection.
      $idea = "$idea" . "$pho";  # 2018-10-09: concatenate for ReEntry()
      $pho = " ";  # 2018-10-09:
      print "$pho";  # 2018-10-09: after stem, output this inflection.
      $idea = "$idea" . "$pho";  # 2018-10-09: concatenate for ReEntry()
    }  # 2018-10-09: end of test for plural subject-number;
  }  # 2016apr03: end of test for second-person; 
  if ($prsn == 3) {  # 2018-10-20: third person;
    if ($snu == 1) {  # 2018-10-09: subject-number parameter;
      if ($b15 eq "C" && $b16 eq "H") {  # 2018-10-20: last two stem-parameters
        $pho = "E";  # 2018-10-20: add one single "E" 
        print "$pho";  # 2018-10-20: after stem, output this inflection.
        $idea = "$idea" . "$pho";  # 2018-10-20: concatenate for ReEntry()
      }  # 2018-10-20: end of test for verb ending in "-ch"
      if ($b15 eq "S" && $b16 eq "H") {  # 2018-10-20: last two stem-parameters
        $pho = "E";  # 2018-10-20: add one single "E" 
        print "$pho";  # 2018-10-20: after stem, output this inflection.
        $idea = "$idea" . "$pho";  # 2018-10-20: concatenate for ReEntry()
      }  # 2018-10-20: end of test for verb ending in "-sh"
      if ($b15 eq "S" && $b16 eq "S") {  # 2018-10-21: last two stem-parameters
        $pho = "E";  # 2018-10-21: add one single "E" 
        print "$pho";  # 2018-10-21: after stem, output this inflection.
        $idea = "$idea" . "$pho";  # 2018-10-21: concatenate for ReEntry()
      }  # 2018-10-21: end of test for verb ending in "-ss"
      if ($b15 eq "T" && $b16 eq "Z") {  # 2018-10-21: last two stem-parameters
        $pho = "E";  # 2018-10-21: add one single "E" 
        print "$pho";  # 2018-10-21: after stem, output this inflection.
        $idea = "$idea" . "$pho";  # 2018-10-21: concatenate for ReEntry()
      }  # 2018-10-21: end of test for verb ending in "-tz"
      if ($b15 eq "Z" && $b16 eq "Z") {  # 2018-10-21: last two stem-parameters
        $pho = "E";  # 2018-10-21: add one single "E" 
        print "$pho";  # 2018-10-21: after stem, output this inflection.
        $idea = "$idea" . "$pho";  # 2018-10-21: concatenate for ReEntry()
      }  # 2018-10-21: end of test for verb ending in "-zz"
      if ($b16 eq "X") {  # 2018-10-21: final stem-parameter
        $pho = "E";  # 2018-10-21: add one single "E" 
        print "$pho";  # 2018-10-21: after stem, output this inflection.
        $idea = "$idea" . "$pho";  # 2018-10-21: concatenate for ReEntry()
      }  # 2018-10-21: end of test for verb ending in "-x"
      $pho = "S";  # 2018-10-09: add one single "S" 
      print "$pho";  # 2018-10-09: after stem, output this inflection.
      $idea = "$idea" . "$pho";  # 2018-10-09: concatenate for ReEntry()
      $output = "$output" . "$idea" . " ";  # 2018-10-09: concatenate 
    }  # 2018-10-09: end of test for singular subject-number;
    if ($snu == 2) {  # 2018-10-09: subject-number parameter;
      $pho = " ";  # 2018-10-09
      print "$pho";  # 2018-10-09: after stem, output this inflection.
      $idea = "$idea" . "$pho";  # 2018-10-09: concatenate for ReEntry()
      $pho = " ";  # 2018-10-09
      print "$pho ";  # 2018-10-09: after stem, output this inflection.
      $idea = "$idea" . "$pho";  #2018-10-09: concatenate for ReEntry()
    }  # 2018-10-09: end of test for plural subject-number;
  }  # 2018-10-09: end of test for third-person; 
  $idea = "$idea" . " ";  #2018-10-09: add a space after verb for ReEntry()
  $gencon = 1;  # 2018-10-09: to prevent unwarranted calling of Speech()
}  # 2018-10-08: EnVerbGen() returns to EnVerbPhrase() 


5. Variables for the EnVerbGen Module of the AI Mind

$abc -- AudBuffer() transfer character

$audbase -- is the start of the @ear auditory engram of a verb that needs to have its inflectional ending changed in a VerbGen() mind-module such as EnVerbGen() or RuVerbGen(). $audbase is incremented by one successive unit as long as the target word in auditory memory continues, and each character of the target word from auditory memory is sent as the value of $abc into the AudBuffer() mind-module, which left-justifies the target word before sending it to be right-justified in the OutBuffer() mind-module prior to any manipulation of the inflectional ending of the target word.

$b01 -- buffer variable 01 in the OutBuffer() quasi-array

$b15 -- buffer variable 15 in the OutBuffer() quasi-array

$b16 -- buffer variable 16 in the OutBuffer() quasi-array for the right-justifying of an English or Russian word of up to sixteen characters in length. The buffer variable $b16 always contains the very last character in a word of any length. Since each word is right-justified in the OutBuffer(), a module like NounGen() or EnVerbGen() can perform tests on the contents of $b14 and $b15 and $b16 so as to detect one inflectional ending and to replace it with a different ending as necessary. In English, where a noun like "beach" or a verb like "teach" will sometimes need to have "-es" as an ending ("beaches", "teaches"), $b15 and $b16 can be used to detect the "-ch" at the end of the word, as an indicator that the "-es" ending may need to be added on.

$binc -- OutBuffer() B-INCrement for the EnVerbGen() module. The $binc increment-counter allows EnVerbGen() to examine and test all the right-justified characters of an English verb, especially the several characters of an inflectional ending which might need to be changed on the basis of grammatical number (singular or plural), person (first, second, third), or past-tense gender (male, female, neuter).

$dba -- doing-business-as noun-case (nominative, genitive, etc.) or verb-person (first, second, or third)

$idea -- for re-entry of AI thought back into the AI.

$pho -- a "phoneme" or character of auditory input.

$snu -- subject-number as parameter for verb-selection.

$subjpsi -- parameter to govern person of verb-forms by identifying the subject-concept of a verb.


6. Troubleshooting and Robotic Psychosurgery

6.1.a. Symptom: (Something goes wrong.)
6.1.b. Solution: (AI Mind Maintainer devises solution.)


7. Future Development

Similar modules will be necessary for generating adjectival forms and noun-forms.


8. Resources


Please see

http://github.com/kernc/mindforth/blob/master/wiki/VerbGen.wiki

http://cyborg.blogspot.com/search/label/EnVerbGen -- is a weblog URL which invites Netizens to view blog-posts discussing the EnVerbGen and other mind-modules.


9. AiTree of First Working AGI Mind-Modules


Return to top; or to
http://www.gotai.net/forum -- Russian-language AI forum;
http://ai.neocities.org/Dushka.html -- obsolete Russian AI;
http://github.com/kernc/mindforth/blob/master/wiki/RussMan.wiki
http://en.wikipedia.org/wiki/Natural_language_understanding -- solved.
http://old.reddit.com/r/ControlProblem -- NOT SOLVED.
javascript subreddit for AI Mind discussion;
Forth subreddit for MindForth discussion;
Perl subreddit for ghost.pl AI Mind Maintainers.
Joint Artificial Intelligence Center (JAIC) -- the AI Manhattan Project.