是否有用于描述含义的标记语言?

时间:2012-03-26 10:06:41

标签: text markup semantic-markup

我很好奇是否有一种标记语言来描述文本的含义:

这是我的意思以及它的外观的一些例子:

<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>

现在我想添加元信息,以便我可以给文本一个含义:

<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>

我希望已经有一些我没有找到的语言,因为我的“搜索”能力差。

编辑:我不是指实际上像HTML的语言。

这对我来说是标准的html标记:

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

我想启用交叉点并多次描述一个部分,而不是像上面的示例中那样触摸原始文本:

<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>

现在我想在第一行标记“Stack Overflow”并描述它。接下来我想描述“编程”并告诉它是什么以及下一个“Q&amp; A”,之后是一个棘手的部分:我想描述“编程Q&amp; A网站”是什么。

这里有一些我只是弥补:

<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>

1 个答案:

答案 0 :(得分:1)

是的,它被称为语义标记。有关示例,您可以阅读RDF

开始阅读关于Wipikepia关于Semantic Web的这篇文章以及关于Semantic Markup的介绍,它们是一个很好的起点,有许多其他链接和参考。

您可能也有兴趣:

  • Wiki,它不是真正的语义标记,但它与您在示例中编写的内容相匹配。
  • HTML 5 microdata只需在HTML标记中嵌入语义元数据。