翻译:羊牧东岭

原文地址:https://iiif.io/api/cookbook/recipe/0068-newspaper/

用例

数字化报纸比一些其它类型的内容更复杂,因为标题、卷册和刊期的层次结构对于易访问性而言很重要。出版日期和对 OCR 数据的访问对阅览体验也很重要。本专题给出了一个基本的报纸的例子。它有两个刊期,并有链接指向由光学字符识别 (OCR) 软件所生成的文本。本例意在为报纸资源常见的映射解决方案提供一份良好的概述。

实施说明

本专题是由来自 Europeana 项目的 Nuno Freire 整理的,并由 IIIF 报纸社区小组进行了讨论。该示例是一份包含两页的精简版报纸,共有两期。OCR 是基于页面级别而非文章级别来进行的。本例是一份名为“Berliner Tageblatt”的德国报纸,主办者为 Europeana 。在 IIIF 的域中,报纸标题被视为一个IIIF 收藏,并通过items元素来发布IIIF 清单。本例中,刊期 (issue) 被视为在特定日期发布的一个出版单位或版别。有关报纸层次结构以及它们如何映射到 IIIF 的更多讨论,请参阅 IIIF 报纸指南说明。

出版日期或 navDate

报纸的重要属性之一就是发布日期,它可以让用户按发布日期来寻找相应的刊期。为实现这一点,我们特别使用navDate属性。这个属性需要被添加到收藏 (Collection) 中的项目之中,也要添加到刊期的清单 (Manifest) 中。这将使阅览器能够为报纸收藏呈现一套基于日期的导航。

下面的例子将navDate属性通过items属性添加到了收藏中:

完整的 JSON:news_title-collection.json

  1. "items": [
  2. {
  3. "id": "https://../newspaper_issue_1-manifest.json",
  4. "type": "Manifest",
  5. "label": {
  6. "de": [
  7. "Berliner Tageblatt - 1925-02-16"
  8. ]
  9. },
  10. "navDate": "1925-02-16T00:00:00Z"
  11. },
  12. {
  13. "id": "https://../newspaper_issue_2-manifest.json",
  14. "type": "Manifest",
  15. "label": {
  16. "de": [
  17. "Berliner Tageblatt - 1925-03-13"
  18. ]
  19. },
  20. "navDate": "1925-03-13T00:00:00Z"
  21. }
  22. ]

navDate属性也要添加在刊期的清单中,就像下面的例子:

完整的 JSON:news_issue_1-manifest.json

  1. {
  2. "id": "https://.../newspaper_issue_1-manifest.json",
  3. "type": "Manifest",
  4. "label": {
  5. "de": [
  6. "Berliner Tageblatt - 1925-02-16"
  7. ]
  8. },
  9. "navDate": "1925-02-16T00:00:00Z"
  10. },

对于版别,可以插入一个时间值以保证排序。这时,navDate并不表明刊物的发布时间,而是为导航排序之便而插入的时间值。因此,你可以使用06:00这个时刻代表早间版,用17:00代表晚间版,从而保证特定的浏览顺序。

指向注释的链接

数字化报纸通常具有相关联的 OCR 文本。要使其在 IIIF 阅览器中可用,需要采用从报纸页面链接到的 W3C 注释的格式。页面(或 IIIF 画布)之间的链接示例如下所示:

完整的 JSON:news_issue_1-manifest.json

  1. {
  2. "id": "https://iiif.europeana.eu/presentation/9200355/BibliographicResource_3000096302513/canvas/p1",
  3. "type": "Canvas",
  4. "label": {
  5. "none": [
  6. "p. 1"
  7. ]
  8. },
  9. "items": [
  10. {
  11. "id": "https://iiif.europeana.eu/presentation/9200355/BibliographicResource_3000096302513/annotation_page_painting/ap1",
  12. "type": "AnnotationPage",
  13. "items": [
  14. {
  15. "id": "https://iiif.europeana.eu/presentation/9200355/BibliographicResource_3000096302513/annotation/p1",
  16. "type": "Annotation",
  17. "motivation": "painting",
  18. "body": {
  19. "id": "https://iiif.io/api/image/3.0/example/reference/4ce82cef49fb16798f4c2440307c3d6f-newspaper-p1/full/max/0/default.jpg",
  20. "type": "Image",
  21. "format": "image/jpeg",
  22. "service": [
  23. {
  24. "id": "https://iiif.io/api/image/3.0/example/reference/4ce82cef49fb16798f4c2440307c3d6f-newspaper-p1",
  25. "type": "ImageService3",
  26. "profile": "level1"
  27. }
  28. ]
  29. },
  30. "target": "https://iiif.europeana.eu/presentation/9200355/BibliographicResource_3000096302513/canvas/p1"
  31. }
  32. ]
  33. }
  34. ],
  35. "annotations": [
  36. {
  37. "id": "https://../newspaper_issue_1-anno_p1.json",
  38. "type": "AnnotationPage"
  39. }
  40. ]
  41. },

链接的注释采用 AnnotationPage 的形式,示例如下:

完整的 JSON:news_issue_1-anno_p1.json

  1. {
  2. "@context": "http://iiif.io/api/presentation/3/context.json",
  3. "id": "https://../newspaper_issue_1-anno_p1.json",
  4. "type": "AnnotationPage",
  5. "items": [
  6. {
  7. "id": "https://data.europeana.eu/annotation/9200355/BibliographicResource_3000096302513/20b3b1f4cb15f062e53fd50d584d66ff",
  8. "type": "Annotation",
  9. "motivation": "supplementing",
  10. "body": {
  11. "type": "TextualBody",
  12. "format": "text/plain",
  13. "language": "de",
  14. "value": "84"
  15. },
  16. "target": "https://iiif.europeana.eu/presentation/9200355/BibliographicResource_3000096302513/canvas/p1#xywh=182,476,59,43"
  17. },

注意

  • OCR 内容的注释的motivation属性值应该是supplementing
  • 注释指向的目标应该是: Canvas ID 后跟一个 # ,并带上文本所对应的图像区域的 x、y、宽度和高度。

链接到 ALTO 文本

除了链接到注释之外,报纸还有一个常见用例是链接到其他格式的 OCR 文本,就比如 ALTO。这是通过在画布中使用seeAlso属性来实现的。例如:

完整的 JSON:news_issue_1-manifest.json

  1. {
  2. "id": "https://iiif.europeana.eu/presentation/9200355/BibliographicResource_3000096302513/canvas/p1",
  3. "type": "Canvas",
  4. "label": {
  5. "none": [
  6. "p. 1"
  7. ]
  8. },
  9. "seeAlso": [{
  10. "id":"https://../newspaper_issue_1-alto_p1.xml",
  11. "type": "Text",
  12. "format":"application/xml",
  13. "profile": "http://www.loc.gov/standards/alto/",
  14. "label": { "en": ["ALTO XML"] }
  15. }],
  16. "items": [
  17. {
  18. ...
  19. }
  20. ],
  21. "annotations": [
  22. {
  23. "id": "https://../newspaper_issue_1-anno_p1.json",
  24. "type": "AnnotationPage"
  25. }
  26. ]
  27. },

例子

完整的示例由许多不同的文件组成:

  1. 报纸标题的 IIIF 收藏 - newspaper_title-collection.json
  2. 第一期的清单 - newspaper_issue_1-manifest.json
  3. 第二期的清单 - newspaper_issue_2-manifest.json

注意
第一个刊期链接到了 3.0 版的图像 API 节点:

  1. "body": {
  2. "id": "https://iiif.io/api/image/3.0/example/reference/4ce82cef49fb16798f4c2440307c3d6f-newspaper-p1/full/max/0/default.jpg",
  3. "type": "Image",
  4. "format": "image/jpeg",
  5. "service": [
  6. {
  7. "id": "https://iiif.io/api/image/3.0/example/reference/4ce82cef49fb16798f4c2440307c3d6f-newspaper-p1",
  8. "type": "ImageService3",
  9. "profile": "level1"
  10. }
  11. ]
  12. },

但第二个刊期链接到了 Europeana 托管的第 2 版的图像:

  1. "body": {
  2. "id": "https://iiif.europeana.eu/image/3UU6R3RRZZGU2VNISCQX7N474GR7X4VMGYBTIWV2SNCBRGSR2WAA/presentation_images/ea1ba210-ffd3-11e5-b68d-fa163e60dd72/node-2/image/SBB/Berliner_Tageblatt/1925/03/13/0/F_SBB_00001_19250313_054_123_0_001/full/full/0/default.jpg",
  3. "type": "Image",
  4. "format": "image/jpeg",
  5. "service": [
  6. {
  7. "@id": "https://iiif.europeana.eu/image/3UU6R3RRZZGU2VNISCQX7N474GR7X4VMGYBTIWV2SNCBRGSR2WAA/presentation_images/ea1ba210-ffd3-11e5-b68d-fa163e60dd72/node-2/image/SBB/Berliner_Tageblatt/1925/03/13/0/F_SBB_00001_19250313_054_123_0_001",
  8. "@type": "ImageService2",
  9. "profile": "http://iiif.io/api/image/2/level1.json"
  10. }
  11. ]
  12. },

这是为了确保既有一个由 Europeana 托管的示例,又有一个包含 3.0 版可用图像的示例。

相关专题

提供相关专题的项目符号列表并说明它们的相关性。

  • 报纸一般指导
  • 参见