new operator words to list

Today, a brief mention of a new operator. Yeah, I need to record my function operators somewhere, and so far I've been using this blog. Eventually I need a nice tidy document that explains them all. Anyway, the point of this one is a small step towards converting incoming English into back-end BKO. But only a small step. We already have the list-to-words operator, and now here is the inverse.

Let the console explain. First the existing list-to-words operator:
sa: list-to-words |a>
|a>

sa: list-to-words (|a> + |b>)
|a and b>

sa: list-to-words (|a> + |b> + |c>)
|a, b and c>

sa: list-to-words (|a> + |b> + |c> + |d>)
|a, b, c and d>
And so on. Now the inverse, words-to-list:
sa: words-to-list |a>
|a>

sa: words-to-list |a and b>
|a> + |b>

sa: words-to-list |a, b and c>
|a> + |b> + |c>

sa: words-to-list |a, b, c and d>
|a> + |b> + |c> + |d>
OK. So kind of abstract. But we can sub in more meaningful words into our word lists. Let's say a person is hungry, tired and sleepy:
-- learn it:
sa: my-current |mood> => words-to-list |hungry, tired and sleepy>

-- recall it:
sa: my-current |mood>
|hungry> + |tired> + |sleepy>
Anyway, makes inputting a superposition a little cleaner, and more like natural English. BTW, they are actually perfect inverses:
sa: list-to-words words-to-list |a, b, c, d and e>
|a, b, c, d and e>

sa: words-to-list list-to-words (|a> + |b> + |c> + |d> + |e>)
|a> + |b> + |c> + |d> + |e>
That's it for this post.


Home
previous: new function operator bar chart
next: spike wave similarity

updated: 19/12/2016
by Garry Morrison
email: garry -at- semantic-db.org