有一种标记语言可以描述含义吗?

4
我很好奇是否有一种标记语言来描述文本的含义:
以下是我所指的一些示例以及它可能看起来像什么:
<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&A”,之后就是一个棘手的部分:我想描述什么是“编程Q&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个回答

1

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

开始阅读Wipikepia上关于语义Web的文章以及语义标记的介绍,它们是一个良好的起点,包含许多其他链接和参考资料。

您可能还感兴趣:

  • Wiki,它不是真正的语义标记,但它更符合您在示例中编写的内容。
  • HTML 5 microdata:可以简单地嵌入HTML标记中的语义元数据。

你可能真的应该考虑使用微数据。这是一种简单快捷的方法,可以向现有的HTML标记添加元数据。 - Adriano Repetti
转到Wiki和Html 5微数据:这不是我想要的。要使用wiki和Microdata,您实际上必须通过标记它来修改“原始”文本,这太像html了。但是,如果标记中存在“交叉点”,则会遇到大问题。假设有人将文本从0到30标记并描述它。其他人将20到40标记并描述它。这不能轻松地使用“xml”和“html”之类的语言完成。 - user945967
我认为没有完美的解决方案,XML中重叠注释存在问题,而对于手写文本,索引也存在问题... - Adriano Repetti
1
是的,“手写文本”的唯一方法就是通过像素标记。 - user945967
我会给你“+rep”以回答问题,即使我不是很满意^^ - user945967
显示剩余6条评论

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接