Saturday, November 5, 2011

Handling text in the open source ontology engine

Consider the sybolic operation below:
convolve('An apple a day keeps the doctor away',*) =
(An,apple,a,day,keeps, the, doctor, away)


Convolve only works on two G formats, how did that literal get converted into G format? Simple, we redefined our TE operators such that white space is interpreted as the OR operators. So, predefining a different set of operators for literals works just fine, in symbolic Imagisoft grammar, TE.

How does the engine do this? Same way, operator switch and reversion to symbolic grammar. Blobs of text appear to the engine like any other set of nested ontology graph, just that the link codes have changed. So, the engine itself will support operator switching if the mappings are predefined. The interface with SQL recognizes the blob as a graph with different operator codes.

The result is a very elegant method to dump loads of human generated text at the thing. Then background bots grind away just like any other graph. When a graph links to a blob, a sort of regular expression conversion takes place on the text blob, and it always appears the same to the executin engine.

Text quotes, then become part of the grammar. Text quotes means, execute regular expression and obtain operators. The substition pattern pre defined. I will add a new sql interface, the blob, to handle the quote operator. I think the regular expression is built into sqlite3. If no quote mappings are declared, thenthe null mapping treats a quote like an atomic keyword. The expansion of a text blob is done in a temporary ontology table, and scratched when the text node is passed.

Once available in ontology form, pattern matching, table look up, phraseology is all perform as native graph convolutions, yielding an minimized ontology pattern, descending back to the original text blob.

In the SQL interface, then the QUOTE operator can link the graph to a text blob, in G format. So frar the SQL interface is down to six or seven main entries, dependent on core graph grammar.

No comments: