Wednesday, November 28, 2012

Semantic Software



I remember in hey hay days of web 2.0, there was lot of talk about semantic web. But it seems that just like many other fads, semantic web fashion (sic!) is also evaporated. 

But still, Semantic web makes lot of sense as web is becoming things oriented from human focused.  In the core of semantic web, lies semantic software.

Before going further, let’s pick some argument which provides differentiation between syntactic and semantic.
Syntax is what the grammar allows, semantics is what it means (http://c2.com/cgi/wiki?SyntaxVsSemantics)

But this differentiation does not provide any clue about, how to make software more semantic.  As per the above statement, every software is semantic.

But, does  this full fill the fully automated internet of things? I do not think so. Then what are the THINGS/CONCEPTS make a software semantic. In my view software which can evolve by itself in an ecosystem is truly semantic. Does our computer have reached that level of maturity where software can evolve by itself? NO.

So, how to make a software self evolve.? I do not know but I think usage of following concepts in software will push in right direction.
1.       Pattern matching
a.       Text  --> Regular expression --> To parse any input text, stored text
b.      Data àstored, real time (Complex Event processing)
2.       Pattern discovery
a.       Text (unstructured data)
b.      Data à stored
3.       XSLT and Schematron
4.       Rule engine
a.       Rules are defined at design time
b.      Rules are defined at run time
5.       Glossary/ontology/taxonomy/data dictionary à not on the piece of paper but in code. Data dictionary usage can be seen in usage of combo box instead of free text, option buttons, 
6.       Choreography (not orchestration)
7.       Understanding of meta data of various constructs and giving handle to user to manipulate them to alter behavior of that construct under the eco-system of given computer ( hardware and/or software)
8.       Artificial Learning (AI) and machine Learning (ML)

Tuesday, November 27, 2012

XML: For my Ninth Grader - Part 2

XML: For my Ninth Grader - Part1



But any real book has a name, author name, text under each element, chapter name, and section name. This information is still not represented anywhere. Let us try to represent this information.

  


If you notice in pictogram, few of the additional information added can be represented better if that gets its own box. For example, in Book --> Front Matter --> Forward, Content need to be broken into Paragraphs and each Paragraph should have its own box.

Lets’ redraw the book picture again with additional understanding.
 






If you notice, few of the things from boxes of previous picture are moved into new boxes while some are remaining inside the original box. For example in forward box, heading remains inside the box while paragraph has moved out.  

This decision is arbitrary and left to the designer of the XML. I have chosen to follow a simple rule. Something which is small will remain the box and something which is big enough, should move out and acquire its own box.

Now let us assume a book which is very simple (so it does not have most the optional elements). So my book’s structure is:


Now let us represent this picture in the form of the text.
 


 


This textual representation is XML.

Reference: