Thursday, June 28, 2018

Whatever happened to those flower arrangements?

They meant a lot more than I let on. (See here and here)

GitHub - where are my stars?

I have a hard time finding the Narwhal repo on GitHub if I search for it using tags. Other repos with thousands of stars are better placed in the search results. Poor Narwhal has something like only 8 stars total. So I just looked at an "nlp"  project that had 1.4K stars and it was a list of links to documents and source code on nlp.
Really? That is 2 orders of magnitude more stars than Narwhal and zero independent content. I think this shows that stars are only one metric and GitHub [Microsoft are you listening] should provide other ranking methods.

Wednesday, June 27, 2018

Are adjectives just simplified parts?

In the format where a context can have a 'modifier' and can also have a 'part', the ambiguity is strongest when the 'part' has just one modifier; or when the original whole has only one part and its modifiers are more simply handled as as modifiers of the original whole.
For example you can talk about the max speed of a car as a simple modifier of 'car' or you can make it one of the modifiers of the 'performance characteristics' - part of the car. If you were going to talk about acceleration and other performance characteristics it would be better to have the max speed not be a simple modifier of 'car'.

Saturday, June 23, 2018

Language Principle: you can say whatever you like

I like the idea that you can intend  to speak about something a certain way, even when it is not natural to the thing. For example "the collection of circle" or "you know, I wish last week". Not only can you intend to speak this way, you can sometimes even make a bit of sense out of the nonsensical. This gives rise to a general principle, which is that you can speak about something any way you choose.

This principle might help the denouement of the adjective/part distinction.  Let me explain: it is not completely crisp that having "parts" (namely sub contexts) is not the same as having modifiers (individual attributes). Take for example a "car" that has a color attribute. But how fast the car can go, is not really a simple modifier. It is a modifier of the car's "performance" sub-context [I call sub-contexts "parts"]. I don't think it helps the study of philosophical ontology, to confuse the self attributes with the part's self attributes.

Nonetheless, the principle says: you can talk about a part's attributes as if they were the self attribute of the original object. You can talk about maximum speed as an attribute of the car. In that sense: does it matter if you get the ontology wrong? Perhaps it does not matter if you are trying to communicate, because subtle context switching is going on all the time when we interpret speech.

But you have to be more careful if you are writing a program. The "subtle" context switching can come later. In the shorter term, you must distinguish carefully between modifiers and parts of a context "object".

Wednesday, June 20, 2018

Teasing apart the structure of a "context"

Starting with a vague "lump" of desire for conversational context to be defined, I have come so far as to define a ContextFrame (a template) and a ContextRecord (A snapshot of a partially filled template). Now I am getting clearer, slowly day by day, on some of the details. So we have

ContextFrame:
   ID (with a self vocab)
   ENV (another ID)
   MODS (each with a tree of vocabs)
   PARTS(each with its own ID)
   RELS (narrative structures used to fill MODs)

ContextRecord:
   (a printout of ID and MOD values)

Generally I will assume a tree of ContextFrames, doubly linked via ENV and PARTS and with a single parent. Later we can talk about dynamic re-assignment of ENV.
**********************************************

Where it is starting to get subtle is in the observation that a linked collection of ContextFrames can include both a tree of ID vocabularies and a collection of trees: one per MOD, per each frame.

To be honest, although I am pretending that there is nothing real or anatomical about the format that I am defining, in the back of my mind I hope there is something correct about these definitions that transcends my current programming needs. I am being merciless with myself, trying to be as clear as possible. So two types of trees emerge within definitions and I wonder about neural anatomy. Since the contexts are almost nothing but 'wiring' it is easy to imagine it.

Monday, June 18, 2018

Three weeks into retirement and coding resumes

I have been trying hard to force myself back into real thoughts about real subjects - related to my 'language automation' interests. Finally got close enough that I am about to start writing new Python code - a milestone I have been hoping to achieve, three weeks after quitting work and going into a full-time "vegetative" state.
Update: A week later I have a working context object containing lots of trees with VARs. Now I have to start passing text through it to explore and implement switching between sub contexts.
Update 2: [bearing in mind that I am trying to justify having retired and trying to reassure myself that it won't be that bad] Another week and I have a reasonable starting implementation of ContextFrames and am about to start implementing ContextRecords, which save instances of attached Frames.

Did I mention the insight that a frame attachement is simply the evaluation of certain variables of a frame? So eg the base point of a Frenet Frame is "attached" when it is set to the position on a curve at time t.

Saturday, June 16, 2018

More Geometry of Language: Attaching ContextFrames at a point of a Conversation

My overall metaphor has been that a narrative structure is fit to a piece of incoming text. I am changing that a bit and making the ContextFrame the entity 'fit' to incoming text. The metaphor is that understanding text is a frame attachment.

The 'relations' in a ContextFrame are narrative structures used to create a record (a ContextRecord) from the template of the frame and the incoming data. This filling of the record is the exact equivalent to what happens in differential geometry when attaching or 'adapting' of a frame to data. Eg, when a Frenet frame is attached to a curve, that  means setting a base point and direction vectors equal to values.

As I pointed out in Best Models, the Frenet frames are iterative and progressive. They stop after 3 dimensions because it is a complete coordinate system. However contacts of line, circle, spiral, and all higher order curves are all available for fitting with additional iterations, using higher and higher order derivatives. In the same way the ContextFrames can be more or less attached - although I am not clear about iteration order and the need to start with the most general frame.

The point is that ContextFrames are attached to language data in the same way as geometric frames are attached to geometric data - by evaluation. The template represented by the frame's definition is filled in to create an attachment. I believe the metaphor is good.

Update: Barb asks good questions: "How is this unique? What is if good for?"
Answer is: it is a new way to talk about reality with context replacing object as the center of discussion. Also, it closes the loop with the mathematical ideas of adapted frames, where now language takes its place besides visual reality as subjects of geometric thinking. What it is good for is to organize context within the language and data part of a chatbot program, rather than organizing context within the program logic of a chatbot. 

Faint justification for quitting work

I am feeling guilty about quitting and am trying to justify it to myself. I am currently working as hard as I can (not too hard) on understanding conversational context in a broader sense than the previous work on 'short term' conversational context. It is hard going because it is extremely abstract, because I have lost a lot of mental energy, and the motivation is being formed out of boredom and a residual ambitions that have not gone away while becoming slowly more absurd. Weak tea.

But I am making  progress and am somewhat proud of the new ideas coming together and I am pretty sure I could not do this during off hours from a job, on weekends and at the end of a weekday. I am having a hard time focusing but it would be impossible if I was tired and thinking about work. So I think husbanding my energies and spending them only on what is left of my creativity is the right thing to do, because I can afford it. My parent's left me just enough.

So, a couple days later and the definition of ContextFrame from the previous post has remained unchanged. It is a stable idea. Now I am trying hard to look at examples and test assumptions. Like this:
Rules related to ContextFrame
1. Want equivalent (?): a context with N parts, or a context with a mod having N values
(This is stressed below, eg 2 and 4. So the equivalence begins to break down)

2. Want access to part mods but not part parts.

3. Want access to parent mods? parts?
Maybe want no access to parent mods. The parts can be accessed in the 'relations' but lets try assuming that access to a parent mod forces a context switch.

4. The values of a mod should be mutually exclusive (but parts are not)

Monday, June 11, 2018

Refactoring "context"

Retired and with plenty of time to try to pull together some kind of focus, I have been thinking about "context". I have been treating it as a property of a conversation, so that chatbot architecture would be responsible for it and that is wrong. In a conversation there is one context per participant but each participant is operating within a structure [whatever it is] that is self contained and meaningful without being generated by a conversation. In other words context is really something that should be handled properly in core Narwhal files.

I have been trying hard to get this stuff straight. It seems there is a concept of context frame that can contain other context frames and has a form something like this:

ContextFrame
  • id (a self vocabulary list)
  • Environment (properties and parts of the parent frame)
  • modifiers (a tree of categories and values)
  • parts (contained context frames)
  • relations (narratives for connecting text to filled values)
I am trying to get straight things like: how does a "currentContext" pointer get switched from one to another context. How data can be stored in parallel instances of a template that defines the contextFrame contents.

In terms of "old" Narwhal ideas, what this whole program of understanding "context" as an attribute of language underlying conversation amounts to is a reformulation of the "vault" concept; so the vault will have much more structure. It will store these elusive template instance records but the language program for interpreting text can be designed around narrative structures that are automatically used to relate those templates....blah blah blah.

One important clarification is that to "attach" a context frame to the incoming text is the same as assigning values to its data template.