Search code examples
textmarkupsemantic-markup

Is there a mark-up language to describe meanings?


I am curious if there is actually a mark-up language to describe the meanings of a text:

Here some example of what I mean and how it could look like:

<text>Stack Overflow is a programming Q & A site that’s free. Free to ask questions,
free to answer questions, free to read, free to index, built with plain old HTML, no
fake rot13 text on the home page, no scammy google-cloaking tactics, no salespeople, no
JavaScript windows dropping down in front of the answer asking for $12.95 to go away.
You can register if you want to collect karma and win valuable flair that will appear
next to your name, but otherwise, it’s just free. And fast. Very, very fast.</text>

And now I want to add meta-information to it so that i can give the text a meaning:

<mark from="0" to="14" object="Stack Overflow">Stack Overflow is a online community for coders.
The website is: www.stackoverflow.com</mark>
<mark from="20" to="31" object="programming" source="en.wikipedia.org/wiki/programming">
Computer programming (often shortened to programming or coding) is the process of
designing, writing, testing, debugging, and maintaining the source code of computer
programs</mark>

I hope there is already some language out there which I didn't find because of my bad "search"-abilities.

EDIT: I dont mean languages that are actually like HTML.

This is for me a standard html markup:

<p>My really <span class="important">interessting</span> paragraph</p>

I want to enable intersections and describe one part multiple times and not touch the original text like in my example above:

<text>Stack Overflow is a programming Q & A site that’s free. Free to ask questions,
free to answer questions, free to read, free to index, built with plain old HTML, no
fake rot13 text on the home page, no scammy google-cloaking tactics, no salespeople, no
JavaScript windows dropping down in front of the answer asking for $12.95 to go away.
You can register if you want to collect karma and win valuable flair that will appear
next to your name, but otherwise, it’s just free. And fast. Very, very fast.</text>

Now I want to markup "Stack Overflow" at the first line and describe it. Next I want to describe "programming" and tell what this is and next "Q & A" and after that comes a tricky part: I want to describe what a "programming Q & A site" is.

Here something i just make up:

<mark type="description" line="1" from="0" to="15" subject="Stack Overflow" language="English" source="http://en.wikipedia.org/wiki/Stack_overflow">
In software, a stack overflow occurs when too much memory is used on the call stack. 
</mark>
<mark type="description" line="1" from="25" to="40" subject="programming" language="English" source="http://en.wikipedia.org/wiki/programming">
Computer programming (often shortened to programming or coding) is the process of designing, writing, testing, debugging, and maintaining the source code of computer programs.
</mark>
<mark type="alias" line="1" from="42" to="47" subject="Q & A" language="English">
Question and Answer
</mark>
<mark type="description" line="1" from="25" to="52" subject="programming Q & A site" language="English" author="xMRW">
A website that offers people answers on questions related to the subject programming.
</mark>
<mark type="description" line="1" from="25" to="52" subject="programming Q & A site" language="German" author="xMRW">
Das gleiche in Deutsch.
</mark>

Solution

  • Yes, it's called semantic markup. For an example you can read about RDF.

    Start reading this article on Wipikepia about Semantic Web and this introduction about Semantic Markup, they are a good startpoint with many other links and references.

    You may also be interested in:

    • Wiki, it's not really semantic markup but it matches more what you write in your example.
    • HTML 5 microdata: to simply embed semantic metadata in your HTML markup.