2014-09-23 85 views
1

我知道有一个similar question但我的情况有点复杂。标记订购的描述清单

我就代表一种类型的Linguistics Olympiad问题,这给解决者写在一个未知的语言几个句子和其相应的翻译,像这样的工作:

1. edèì âno nwạ́sesè ozyí lẹlemù à? edèì ânò wei ga òkí nwạsese ozyí lẹlemù. 
Will this man frighten the deceived thief? 
This man said that he (this man) would not frighten the deceived thief. 

2. ạvùràmù kịnono amemùrè ânò à? ạvùràmù wei ga òkì kịnono amemùrè ânò. 
Did the woman resemble this girl? 
The woman said that she (the woman) did resemble this girl. 

... another five sentences 

from IOL 2014, Problem 4 

求解器需要推断这种语言和完成的语法几个任务。两种类型的作业始终出现:从未知语言翻译到未知语言。

最初,我决定使用有序列表。但我很快意识到这些句子实际上是一个名称 - 值组。但是:

  1. 每个句子之前的数字对参考目的有意义。
  2. 计数器在赋值部分重用。如果我选择使用它,我需要在css中使用计数器或在有序列表上明确设置start属性。
  3. 在翻译任务中,只给出了一个版本的句子,无论是未知语言还是Solver-ese。所以这些句子不包含名称 - 值组。

这里是我的问题:

我应该使用那些句子描述列表。仅在给定的数据集中?或者在翻译任务中的数据集和句子中?

如果是这样,我应该如何表示下列内容:

Translate into Engenni: 
11. Will the old man resemble this coughing youth? 
The child said that he (the old man) would not resemble this coughing youth. 

12. Did this beaten woman not frighten the man? 
This beaten woman said that she (this beaten woman) did not frighten the man. 

在描述列表?根据标准,我不应该使用<dd>,但在数据集中,英语句子在<dd>


一个莫名其妙不相干的问题:如果我使用有序列表,我应该用两个<p>为同一译文的两个版本?或者我应该使用<i>明确标记未知语言的版本?或者,也许<i>是不恰当的,所以我需要使用语义中立的<span>

+0

您的清单确实订购了吗?如果您使用名称而不是数字作为参考,并以不同的顺序放置列表项目,是否会改变问题?如果不是,那么你没有一个有序的列表。 – Alohci 2014-09-23 09:30:45

+0

@Alohci句子的顺序没有什么特别的意义,但是因为我只是在复制问题,所以我应该保持网站版本与已经发布的比赛问题的一致性。从这个角度来看,我的名单是有序的。 – 2014-09-23 12:45:49

+0

亲自说明,如果段落没有语义排序,只是偶然排序,我不会使用有序列表,因为只是使用dl会保留该附带排序。但这很主观。 – Alohci 2014-09-23 13:01:51

回答

0

您应该不要在此处使用有序列表(ol)。只有在项目的排序有意义时才使用此元素,而不仅仅是因为它们以某种方式排序(例如,通过“任意”计数器)。

如果计数器是重要的内容,您应该将其作为纯文本内容,而不是通过ol的默认样式。问题依赖于默认ol计数器:

  • 用户无法按Ctrl +˚F了许多。
  • 当用户复制粘贴内容时,可能不包括计数器。
  • 具有不支持start属性的用户代理的用户将得到错误的计数器。
  • CSS!不要依靠它来传输内容

对于数据集,你可以使用一个dl

<section> 
    <h1>Translations</h1> 

    <dl> 

    <dt> 
     <b id="translation-1">1</b> 
     <p lang="und">edèì âno nwạ́sesè ozyí lẹlemù à? edèì ânò wei ga òkí nwạsese ozyí lẹlemù.</p> 
    </dt> 
    <dd> 
     <p lang="en">Will this man frighten the deceived thief? This man said that he (this man) would not frighten the deceived thief.</p> 
    </dd> 

    <dt> 
     <b id="translation-2">2</b> 
     <p lang="und">ạvùràmù kịnono amemùrè ânò à? ạvùràmù wei ga òkì kịnono amemùrè ânò.</p> 
    </dt> 
    <dd> 
     <p lang="en">Did the woman resemble this girl? The woman said that she (the woman) did resemble this girl.</p> 
    </dd> 

    </dl> 

</section> 

dl另一种可能是简单地使用HTML5的切片元素和标题:

<section> 
    <h1>Translations</h1> 

    <article> 
    <h1 id="translation-1">1</h1> 
    <p lang="und">edèì âno nwạ́sesè ozyí lẹlemù à? edèì ânò wei ga òkí nwạsese ozyí lẹlemù.</p> 
    <p lang="en">Will this man frighten the deceived thief? This man said that he (this man) would not frighten the deceived thief.</p> 
    </article> 

    <article> 
    <h1 id="translation-2">2</h1> 
    <p lang="und">ạvùràmù kịnono amemùrè ânò à? ạvùràmù wei ga òkì kịnono amemùrè ânò.</p> 
    <p lang="en">Did the woman resemble this girl? The woman said that she (the woman) did resemble this girl.</p> 
    </article> 

</section> 

使用tablewould be possible, too,但我不喜欢它在这种情况下。那么实现所需的样式可能也很难。


转换分配的选择不应取决于您用于数据集的标记。但是当你明确地提供计数器时,这将被放置在dt,所以英语句子最终在dd。但是,也可以使用ul,而不是dl,或者再次使用标题分段元素。

+0

感谢您的回答。但是,每个句子是否都符合“

”的定义? “文章元素代表文档,页面,应用程序或网站中的完整或自包含的组合,并且原则上可独立分发或可重复使用,例如在整合中。”来自W3.org。 – 2014-09-24 11:27:48

+0

@民生刘:如果我正确理解你的情况,我会说是,'文章'适合用未知语言及其翻译的句子,它们一起形成一个“独立的内容”。但是,如果您认为“文章”不合适,则可以使用“section” - 这不会改变任何轮廓明智的内容(无论如何,只要您使用标题即可)。 – unor 2014-09-24 11:34:55