Sunday, July 17, 2016

The Narwhal Language - a Python extension that implements semantic concepts

I started thinking about promoting my "proto semantics" via a computer language for narrow world language programming. It is fun and convenient to call this the Narhwal Language and thinking about it has clarified several things.
At a theoretical level, I finally see that the base space in a Best Model implementation of language recognition, is a structure of keyword dictionaries. Like this:
Entities like this play the same role as numbers and measurements play in geometric pattern recognition. But it is the narrative patterns that play the role of geometric figures. These narrative patterns live in the total space of meanings. For noise, we have these functional narratives:
     SOUND
     SOUND_/TOD
     PROBLEM_/SOUND, (PROBLEM_/SOUND)*
     LOC _RELATION_/ SOURCE
     MATERIAL -OPACITY-> SOUND
    (SOURCE,LOCATION)_/INTENSITY :: SOUND


So Narhwal is designed around making these ideas accessible to a programmer who wants to write text-aware classes but wants to focus on the details of his subject, not on generalities about how language works.
At a practical level, one discovery helps me to see how Narhwal could be implemented. This is the separation of the summary narrative:
        (SOUND->[ME] :: [ME]_/AFFECT)
from the functional ones and the realization that the functional narratives need a hard coded mapping to the summary narrative. But once you see how to do that and see how text can be filtered through the functional narrative patterns, an implementation starts to become visible on the horizon.
Also at a practical level, it is worth clarifying the tree of keyword dictionaries illustrated above. One basic concept is the difference between OR'ing and XOR'ing of sub-dictionaries. Another is the difference between sub-dictionary and child dictionary. These are needed to specify the structure that I think is required.
Back to the theoretical level for a moment: incoming text is seen as a path through the base space and its interpretation is a lifting to the total space. By using a goodness of fit measure that counts the number of words consumed, one hopes that the best fit lifting is a reasonable approximation to the "true" meaning that will forever be stored, untouchably, in different people's different minds.
Update:  Not long after seeing that a computer language was possible, I was noodling around in a tongue-in-cheek sort of way trying to think of a name for the language. "Narhwal" works for narrative patterns as well as for narrow worlds and, given the number of computer languages that are named after animals, seemed like a winner. In fact, as soon as I had a name to use, I started using it and the project was launched.

1 comment:

  1. Then ironically the name of the whale turns out to have a possible connection to the word for "story", via the Latin word for jester.

    ReplyDelete