LangLearn language-learning module of the

English and Russian bilingual ghost.pl AI in Perl

Mens Latina in Latin -- MindForth for Robots


1. Diagram of the LangLearn (language-learning) Mind-Module


   /^^^^^^^^^\Modules to be habituated into syntax /^^^^^^^^^\
  /   EYE     \     | | |    _____     _____      /   EAR     \
 /             \    | | |   /Noun-\   /Verb-\    /             \
|               |   | | |  ( Phrase) ( Phrase)  |               |
|   _______     |   | | |   \_____/   \_____/   |               |
|  /image  \    |   | | |               ___     |               |
| / percept \---|-----+ |   ____       /Ad-\    |  auditory     |
| \ engram  /   |  a| | |  /Pro-\     ( verb)   |  memory       |
|  \_______/    |  b|c| | ( noun )     \___/    |  channel      |
|               |  s|o|f|  \____/               |  where        |
|   visual      |  t|n|i|                       |  thoughts     |
|               |  r|c|b|      _____________    |  enter        |
|   memory      |  a|e|e|     ( Conjunction )   |  and          |
|               |  c|p|r|      \___________/    |  reenter      |
|   channel     |  t|t|s|    ___                |  the          |
|               |   | | |   /Ad-\    ______     |  conscious    |
|               |   | | |  / jec-\  /Inter-\    |  Mind         |
|               |   | | |  \ tive/ ( jection)   |   _________   |
|   _______     |   | | |   \___/   \______/    |  /"the"    \  |
|  /fresh  \    |   |_|_|      _____________    | / "more"    \ |
| / image   \   |  /     \    ( Preposition )   | \ "the"     / |
| \ engram  /---|--\ Psy /     \___________/    |  \"merrier"/  |
|  \_______/    |   \___/                       |   \_______/   |


2. Purpose of the LangLearn Mind-Module

The purpose of the LangLearn language-learning module ranges from the small chore of mimicking a novel syntactic construction for comprehension and generatioon, up to the enormous task of learning an entire human language in the same trial-and-error way as a human baby learns.


3. Algorithm of the LangLearn Mind-Module

In the first of two implementations envisioned for the LangLearn module, the situation of encountering an unfamiliar chain of syntax will trigger a flag that calls the LangLearn module to mimick the novel syntax. For example, a phrase like "The more the merrier" might at first confuse and confound an AI Mind, but the LangLearn module could habituate a template of possible recognition of similar phrases in the future, such as "The bigger they are, the harder they fall." Such a habituated template may be used for both the comprehension and the generation of the novel syntax.

In the second of two potential implementations of the LangLearn module, an AI program such as the ghost.pl AI Mind could use the Spawn module to create a copy of itself enhanced with hardcoded syntax instead of merely weighted elements on a syntactic chain of mind-modules.


4. Code of LangLearn() from ghost.pl AI source code in Perl

pseudocode

In a syntactic habituand chain of up to seven nodes, all part-of-speech modules are candidates for possession of each node, but only the module with the highest numeric weight-value will be operative at the particular node. Thus a sentence-structure may be habituated with any target syntax, such as noun-verb-noun or noun-noun-verb.

node1 adjw1 advw1 cnjw1 nphw1 prpw1 vphw1 "some"
node2 adjw2 advw2 cnjw2 nphw2 prpw2 vphw2 "men"
node3 adjw3 advw3 cnjw3 nphw3 prpw3 vphw3 "always"
node4 adjw4 advw4 cnjw4 nphw4 prpw4 vphw4 "live"
node5 adjw5 advw5 cnjw5 nphw5 prpw5 vphw5 "in"
node6 adjw6 advw6 cnjw6 nphw6 prpw6 vphw6 "great"
node7 adjw7 advw7 cnjw7 nphw7 prpw7 vphw7 "fear"


5. Variables for the LangLearn (language-learning) module

$adjw -- a proposed variable to hold the high or low weight that determines whether or not an adjectival mind-module is habituated into a particular position (node) in a syntactic chain of linguistic mind-modules. For adjectives, a typical position might be before a noun or after a noun.

$advw -- a proposed variable to hold the high or low weight that determines whether or not an adverbial module is habituated into a particular position in a syntactic chain of mind-modules. For adverbs, a typical position might be in advance of a verb or an adjective or another adverb.

$cnjw -- a proposed variable to hold the high or low weight that determines whether or not a conjunction module is habituated into a particular position in a syntactic chain of modules forming a complete sentence. For conjunctions, a typical position might occur in the middle between two other modules being joined.

$nphw -- a proposed variable to hold the high or low weight that determines whether or not a noun-phrase module is habituated into a particular position in a syntactic chain of modules forming a complete sentence. For nouns, a typical position might be at the syntactic start of a sentence.

$prpw -- a proposed variable to hold the high or low weight that determines whether or not a preposition module is habituated into a particular position in a syntactic chain of modules forming a complete sentence. For prepositions, a typical position might occur at the start of a prepositional phrase.

$vphw -- a proposed variable to hold the high or low weight that determines whether or not a verb-phrase module is habituated into a particular position in a syntactic chain of modules forming a complete sentence. For verbs, a typical position might occur between a subject-noun and the object of the verb, or at the syntactic end of a sentence.


6. Troubleshooting and Debugging for AI Mind Maintainers

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


7. Future Development

It may be possible to code a blank-slate AI Mind containing modules for all possible parts of speech but no particular syntax governing the order of appearance of the parts of speech in a sentence being generated. The LangLearn module of such an empty Mind could perhaps learn an entire human language through the same trial-and-error process by which a human baby presumably learns language.

Roadmap to Artificial Intelligence


8. Resources


Please see...


9. AiTree of Mind-Modules for Natural Language Understanding



Use "Look Inside" Kindle version to read initial chapters.


Website Counter