概要

Text Overlay plugin for Mirador 3は、OCRまたはトランスクリプションに基づいて選択可能なテキストオーバーレイを表示するMirador3のプラグインです。

https://github.com/dbmdz/mirador-textoverlay

以下でデモページが公開されています。

https://mirador-textoverlay.netlify.app/

一方、日本語などの縦書きテキストを表示してみると、以下のようにうまく表示ができませんでした。

そこで、上記のリポジトリをフォークして、縦書きテキストも表示できるようにしました。以下のリポジトリでソースコードを公開しています。(いずれプルリクエストも検討したいと思います。)

https://github.com/nakamura196/mirador-textoverlay

結果、以下のように縦書きテキストも表示できるようになりました。

デモページは以下です。

https://nakamura196.github.io/mirador-integration-textoverlay/?manifest=https://nakamura196.github.io/static/iiif/6722fa34-2fff-11ee-a029-0242ac1c000c/manifest_o.json&annotationState=1&canvasIndex=3

以下、本モジュール開発に関連する事項をメモします。

マニフェストファイルの構造

本モジュールでは、以下の要件を満たすIIIFマニフェストが必要とのことでした。

https://github.com/dbmdz/mirador-textoverlay#requirements-for-supported-iiif-manifests

いくつかのオプションがありますが、以下のwellcome collectionのマニフェストを参考にしました。

https://iiif.wellcomecollection.org/presentation/v2/b18035723

Canvas毎にseeAlsoでALTO XMLファイルへのURLが指定されています。

{}{}{}{}{}""""""}"""",,,}"}"""@@fhws]"]"@@lt"""""""",s,hwiitoeie"""""",o,witah"""whwhwhwh}e""""eim{dyridr@@ppwh}t{}idybu@@sieieieiee@pflida"pmgtvcirrieht"pemite"""""""didididi]Airoagtg"""":eahhiodoodi}"e"""h:elbdyr@@ppwhstgtgtgtgldorbhhe@@mr"tt"cn"fttg,or@@li""n"pvcirrieihhhhhhhhs"fmet"sitoe":"":et:iohhnCitan"::a:eiodoodiz"t"t"t"to:ial":"dytsh::"elc"t"odyb"hi"cn"fttge:":":":""lt"::"piot"7:x"eo:":n"pe:t""l":et:iohhs:::::"e":2:evutd"13th"l:t:elts-"h"elc"t"7127h":34["arpci02{"t:"2"e"""pc":t":x"eo:":21428431{t:"31":tcstm2,:t:43hn"::"s:,tdth"l:,0306020t"M71hie:ya4p"13tth:C{pc{"t:"7[0,0,0,2p"tE2,t"o"/pg,"sh"17t"t""/ast:t:314sheT,ton:/eeh:th,2p:tsT/n:yp"20:txSpa"is/t/ttspceiv/p"sh",2/tt-s::{i:jt/pt:[s:xia/eh:th4/p/A:AiIppi:p/:Atisist/tt,a:xL/n"fme:i/://nf"i:t/ptp/mT/ns.ag/i//i/no.,iIpi:pilOiocwg"/fi/iiofwfm:i/:.w"it:ee,i.iiiite.a/i//ww,Xiapl"iwiifiaplwg/fi/ewMftal,iefi.ftaleei.iil.L.iicfl.fw.igcl"iwiill"wono.li.ewoeol,ieficoentmicoilenmcfl.focl"ieo/ollLeo.li.m.l,ncma/cli-cmicoiegcgoaepaocs"oeo/ocoo"lpcipmotlcma/ovm,li/iem"loaepal/eeli/ce,elpciplsccilmioccli/ietotmeamloteli/caliacgallicilmitnlogtegelotmeamideneieceniacgaoac./2"tc.ogtegnrto2n,itoneie.dir/.loir./2"osogcoenogo2n,r/n/orv.n/r/.lga.ingeo.pgcoe/lomt/lror/orvttraei1gretngeeoggxm./gsht/lx//etajp/euet0tp/.gsranmxh./3rbjeentbtuja/e1snsnas.mslas8b"eot/jbotle0n1,ntibssnotn3"8tao1o/"/ot5,0atn8nb,b.a73ti/0"11xt25iob3,88si37on1500do_2ns8733"n03//0255,/0_bv3377b00125_221308/70338.00b20_/0J331300b3P.58/30152J70c.087/P23aJ302f235nP.33u"/7v2J5/l,c2a/P7cla3sf22a/n/eu"3n7vbsl,_v3a1/l0a2s8b/0s,e0170e1s3823s0/50,./2b731Jb41250P1/83702800_2/"0/3030,3d50_/5e700d7f230e2a3.0f3u_J3a_l0P.u0t02Jl0.0/Pt0j3l2.3p.i"j.gJn,pJ"PegP,2""2",,/painting/anno",

まとめ

開発したプラグインについて、xmlファイルのロードが完了しない時があるなど、引き続き改善が必要ですが、Mirador3のプラグイン開発やIIIF、OCR結果の活用にあたり、参考になりましたら幸いです。