Overview

I had the opportunity to learn how to use DTS (Distributed Text Services), and this is a memo of that experience.

API Used

We will use Alpheios, which is introduced at the following page.

https://github.com/distributed-text-services/specifications/?tab=readme-ov-file#known-corpora-accessible-via-the-dts-api

Top

https://texts.alpheios.net/api/dts

We can see that collections, documents, and navigation are available.

{}""""""n@@c@daitocovdyloci"plnug:eetma"ceet":txniitta"o"snpEn:""ins::/t""dr:d""tyt//sP"saa"o//pp,iaEiinpn//titdd"/rtt,dysstP/sdnioacncvotuil.mgljeaesntcotitn"oilnod"n",s,",

Collection Endpoint

collections

https://texts.alpheios.net/api/dts/collections

We can see that it contains 2 sub-collections.

{}""]""""}tm{}{},t@@@""oe"""",""""iitcd@tm@@tt@@tttdyotvabitoiitoil"pnsoledyttdytte:et"cIr"pal"pal""e:at":ele:ele:":xbe:"I""I"dt""m":t:":t:"e""h:s[ueueNfC:t"r"m"r"m"oaot":nCsCnCsAnul{ph:o"l:o"nellst2al:aal:c"te:t,llslli,"c/ppe3spe4e,t/shc,ihc,niw:etcetto3/iiaiini/oolooG"dwsnsnr,.w:"L:"eowl,ag,er.atrkgwtie"/3ined.n"ktoLLsrii/gtta/""pn,,is#/"h,ydra/core#"

Classical Latin

Specifying the id urn:alpheios:latinLit to narrow the collection to Classical Latin.

https://texts.alpheios.net/api/dts/collections?id=urn:alpheios:latinLit

We can see that it contains 3 sub-collections.

{}""]""""}"}tm{}{}{},t@@@""",d"]oe"""","""",""""iitcd@ntn{}tm@@tt@@tt@@tttdyotvsss""abitoiitoiitoil"pnso1:1@@ledyttdyttdytte:et"c"e:vlIr"pal"pal"pal""e:a:xpaat":ele:ele:ele:":xbtrlne:"I""I""I"ut"""eeugm":t:":t:":t:"r""h:hnfeus[ueueueCnC:ttsL"a"r"m"r"m"r"m"l:ot"tia:g:nCsCnCsPnCsOaal{phpobe:o"a:o"r:o"vsllst:ne""3cl:tcl:ocl:ispe:t/slC:,tlutlptldihc/p/""lse1lse1ese1"cet/sw::a":c,l:c,r:c,aiiw:wseltulttltloo3/w{[snaisaiiaisni/.igto"toutoL:"dwwc"ininsinal,.w3an"n",n"taow.lL,L,L,itr.oiiSinigwrLttet"n/3ga::x:,Ld.tpptpit2ihhuhtsr0niisi"/g0"00"0,a/4,469pn/725is0209#/2""""h/,,,,ysdkroas//ccoorree##"",

Catullus

Specifying the id urn:cts:latinLit:phi0472 to narrow the collection to Catullus.

https://texts.alpheios.net/api/dts/collections?id=urn:cts:latinLit:phi0472

We can see that it contains 1 sub-collection.

{}""]""""}"}tm{},t@@@"""",d"]"]oe""""iitcdcn@tc{},n{}tm@@tttdyottsvst""s""abitoil"pnss1o:s@@1@@ledytte:et"""ce:vl:vlIr"pal""e:::axgaapaat":ele:":xbtrlnrlne:"I"ut""""eougeugm":t:"r""hhh:nueufeus[ueCnC:tttsp"aL"a"r"m"a:ottt"in:ga:g:nCsCtcl{ppphoaebe:o"autls::tnm""e""1cl:rlse:tseC:lC:,tlml:c/p""a"ase1iultcws::t":t":c,nsaiwhw:ueuelta"to3sw{[ln[lnai",ini../lglgton"dhwwu"u"inL,.a3wssn"ior.w""L,trvo.,,i:garwtp/rg3:hdd.pit.2oh0se0ri4/d0g07au442p/n7"ix0s2,#m2."lhp,nsyhskdi/or0csa0t//1scc"/oo,"rr,ee##"",

Carmina

Specifying the id urn:cts:latinLit:phi0472.phi001 to narrow the collection to Carmina.

https://texts.alpheios.net/api/dts/collections?id=urn:cts:latinLit:phi0472.phi001

Unlike previous results, we can see that member contains data of Resource type.

{}""]""""}"}tm{},t@@@""""",d"]""]oe""}"}""""""iitcdcn@ntc{},nn{}tmtd""],d"]""]"],dt@@ddtdyottsvsst""ss""abotdd{}tc{},nn{},c{}tiitttl"pnss1o2:s@@21@@letstt"st""ss""t""stdysse:et"""c"e:vl::vlIra:ssd:s@@21@@s@@:l"p::""e:::a:xtaalpaat"lc::te:vl::vl:vlpe:erc:":xbtilnarlne:Iiccsxlaalpaadaaa""eiut"""""etugneugmttii:talnarlnelns:":ft"r""hhh:hnleugfeus[eettcebugneugsugsueeCnC:ttttse"auL"a"mSeeineeugfeuceua"r"rDa:ottt"ti":gaa:g:stTStsl"auL"ar"agCnReercl{ppphpo:egbe"rytei":gaa:gi:gea:enpmtls::t:n""ee""1:uprTo:egbepe"rcsctise:t/s[C:"lC:,ceuyn""ee""t"":mtoehn:c/p/"a:"a0t"cps[C:"lC:iC:isus"altcwsp:r":r",u:te"a:"aoa"n:r":"aiwhw:uml"mlru":r":r"nt"/alc:,to3swr{ial[iae"r:ml"ml"uea"ae2ini../lntant"pe{ial[ia:lnp,t""n"dhww.a"ta":o""ntantlgii,/L,.a3wo"""e:la"ta"[u"/naior.wr,,,{mi"""sdLptrvo.g"[n,,,,tii:garw/,est/p/rg3d"G/:dhdd.cadptit.2o/iohs0se0reuci/4/d0glsu0n7au4em4a2p/nmVe7v.ix0sean2ip#m2nlt.gh"lhte?pai,nsysriht0skd/idii0/or1u=0o1csa.su0n"t/1,r1?,sccn.i/o"c%ad"rrr3l=,eeeApu##achr""tten,,osi%r%o3;3sAA-cMltteaesrtx%rit3in-AlLllliaa,ttt%1iE3"nlA,Lmpiehtri%03T4Ar7pu2he.isp0dh4ei7l02l0.,1p.h1ai8l06p00h1-e.1ia9ol3sp6-h,teeiexodtsi--tltoaertx"1t,"-,lat1",

Also, the URL to the Document Endpoint can be found in dts:passage, and the URL to the Navigation Endpoint can be found in dts:references.

Top

Access the Navigation Endpoint URL obtained earlier.

https://texts.alpheios.net/api/dts/navigation?id=urn%3Acts%3AlatinLit%3Aphi0472.phi001.alpheios-text-lat1

{}""""""}"]plc@c@"",h{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}aeiiich@y",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",",","svtdtoyvdrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrsee"endoreeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeealT:Dtrcafffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffg"yeeaa:"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""e:p"px"bm:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"e/tt:"e:1"ah":m""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""",:p":"b123456789111111111222222222333333333344444444445555555555566666666666777777777778888888888999999999911111111111111111"i:h"e"""""""""012344567123456789012345678901234567890123456788901234567889012345678890123456789012345678900000000001111111/"/{thr"""""b"""""""""""""""""""""""""""""""""""""""""b"""""""""ab""""""""""b"""""""""""""""""""""01234567890123456apd2tt"""""""""""""""""""""""pot,pt:iessp/m/:s[d"n/:t,a//svw//iwwdgw3oa.ictwdui3.mo.oenorn?rgtlg?edivntdess=l//u=har1ypn&di%ir#3da"A=/cuctrosnr%%e33#AA"lc,attsi%n3LAilta%t3iAnpLhiit0%437A2p.hpih0i407021..pahlip0h0e1i.oasl-ptheexito-sl-atte1x{t&-rleaft}1{&&gsrtoaurptB}y{=&1e"n,d}",

Specifying the ref Parameter

Based on the results obtained, let’s try adding &ref=1 as follows.

https://texts.alpheios.net/api/dts/navigation?id=urn%3Acts%3AlatinLit%3Aphi0472.phi001.alpheios-text-lat1&ref=1

The following result was obtained.

{}""""""}"]plc@c@"",h{}{}{}{}{}{}{}{}{}{}aeiiich@y",",",",",",",",","svtdtoyvdrrrrrrrrrrsee"endoreeeeeeeeeealT:Dtrcaffffffffffg"yeeaa:""""""""""e:p"px"bm::::::::::"e/tt:"e:2"ah":m"""""""""",:p":"b1111111111"i:h"e........../"/{thr1234567891ald2tt""""""""""0pit,pt:"inssp/e/:s[d"n/:t,a//svw//iwwdgw3oa.ictwdui3.mo.oenorn?rgtrg?edifntd=ss=1//u&harlypnedi%vr#3ea"Al/c=ct1os&r%ie3d#A="lu,artni%n3LAictt%s3%A3pAhlia0t4i7n2L.ipth%i30A0p1h.ia0l4p7h2e.ipohsi-0t0e1x.ta-llpahte1i{o&sr-etfe}x{t&-sltaatr1t&}g{r&oeunpdB}y"=,1",

InvalidLevel

Since citeDepth is 2, it should not be possible to navigate further down the hierarchy.

To confirm, let’s access the following.

https://texts.alpheios.net/api/dts/navigation?id=urn%3Acts%3AlatinLit%3Aphi0472.phi001.alpheios-text-lat1&ref=1.1

As a result, the following error was returned.

{}"""""s@@dtttceiayosttpncluetres"ei"C:xp:ottd""i"eS:oI"tnn:a""vth:a4utl0st"i4"pd,,:IL/ne/vvwaewllwi".dw3v.aolruge/nfsrhyldervae/lcopnatreaxmte.tjesronilnd"N,avigationEndpointrequest",

Document Endpoint

Top

Let’s access the following URL obtained from the Collection Endpoint.

https://texts.alpheios.net/api/dts/document?id=urn%3Acts%3AlatinLit%3Aphi0472.phi001.alpheios-text-lat1

As a result, the entire TEI/XML was retrieved.

<T/E<<<TIst/t/Ece<<<<te<tIxrif/e/p/r/exb/e>miHi<<<<fn<<er<pe<<<rito<bxlpelt/ep/s/icr/r/nol/rvccceH>dd/otntaei<<<<<<<<txu<<<<po<sloe<<re<<rcfa<<loihhhveyi<dd>sdDtttaespr/fitbppaduub/oedfrrefc/c/eoinllafsaaaia>vd/iy=eeliiudpre<<<<<ruteluuuabri<buDiseefsR<cR<cfdlgaaniinnnsdi<<dv>"rsetttioisrnnnnenlnibbttlcbm/irenDffsDepRepRsieUnnglogggietvd/di>h>cSllhtnnpeaaaasdetclPheielo<<<<mbcsgeSSDef>ef>eDnDsggUeneeeoryi<<<<<<<<<<<<di<<<<<<dvt>teeooscSsmmmmpeS>ailocDSnatei/olecDcttecPTfPTfegeauusDDn>ptvmhllllllllllivmhlllli>tm>rroitpeeeeSrtatsartaetouidm<<<inSD>elaaclahPahPcDsgaaaeewwwDeyievievptCt>rpm>>>>>tmbihciytsrgttipppdmotesttltiatialecegggsshhhe=ptlannnnnnnnnn>tlannnn>:>ayCr>atPBLWDmntooeetpicurhltruuapgrscnee>ntsttst>s>>eeecceees"eyed==========yed====/rp.oPl>rriiat=>unr>yeo>c>oeoibbtrruc>==etetc>>>nnnce=ps""""""""""ps""""/mele>eislv>"tS>M>=ntr>rnPlei>c>"uu"rperpe>ii===>d"etx1234567891etx1234wi=VerGpdaliotTeP"S>>Ctli>ntTnnCnornordd"""it=om"""""""""0=om""""wn"a=sragidr1mrdertCar>as1t>EiiTininee222te"nl>>>>>>>>>""nl>>>>wasl"eereCag1tufrematoch8>IttSnn>nn>nn000ixte:CaCmiodqq>te:Pqce.<ueeugetemS:2>soslttulee9.=="=t=ttt111oteluroeamouupelauutt/brdsodrmNKtree>ule>r32"">"e"e==843npxuaiiramncaalxuasiiet"iirArMiEbeduall=B><"pllrpr""---"atnndnsetrlutnnscaii>utPyulaetH<e,sslu"oG/>oiiole010rpigdoetieespigeupc-tMsornmtrh"/seusesidennpepan419xtat=oleuascat=rmrrclaroCdaor<>eMP"s<dtnameeamatg---m"r="nmisme,huur=",ii.ecC"jres<i/TxoAr><iont"""t"t""001lt"eoo,svamnt"elmso>ha>ear<lnhtf<1ttnett>>463:s"mndecuIbqo"mnduuritEcnnlaeej9aio<a>memeLE"""lueglotumueuegedmsgnu.tetna<mnTpe9utr/nararanabst"eiampemst"leo/el,<ham/eNtuuc7tl"pdtntntgwwwntueppbltpt,aueirdlnlT/emen>a>fbt-he>uccilhhhgybrriuiiariinbrrceiesru.Tpe>attP<1o>EbCheheniooo=pt"edm;quitbqet"ei,gt/esurs>misl/0rlPoPxPxs==="eynuiusbeiuaynai1a<Mfiueoaa->mlmatath"""l=pndmcniuurotpndeqti.d/etnp>nUcu2eaptrtr/TTba"e==eadss,qde==uun0aarsceanet8rcatatalhhatL=""nmu,p=""memc"burirli>h<enececa/iil"y"Pnoeqpeeeie"Pnemi>ltiUpvvo/T>yrtrtnlbbmrphevxuusxtdrpheadtehlnaiEerdr<nsnsgaaaanioawupetpqeoaweiaaolilsnriau/==unuus=cellmoaullupnellnrrtr<>idsttep"p"pagll0"smaeltrniaianmaepeee>/eooiyesu(o(ogutt1u""evliueucbdte"evusxernwt>>db\e\eea"r>ceitsaorceeiamtdsmyelwmwm>gCC>nnelbusnrrhosnellndo<iioe<li++<ellm:=a"emouIeiona=a"lupr/ttfn/ls)a)/>eeoc"n>l?lgtocae"n>aestoy<tph.n"prrvt1"1l<eaacsc2"2ettuir</uMe(d>iiis"<u/bslhilvl"<,eest>/rfber\rccn:>/mla,oasiio>/<nn,lseolr>wleeeglh<>s<rr!br.h/et<epsrir+ip""ae/<ut<eg<elri/>opsi)nl>>Gtallmi/lo/a>e<ln>thl"eaRMrid>l><sll,ld,/>shel<ceoen>>/,>i<>><loer<r/emvgLl<</>r>/epmoi'i>/ll>Hep>evnstll>>udlnig:>>miatnwpatcPgtohnoeaoriirmtdk0t>etuE-4ineppi7etrlin2sPnid-.<a=copp/t"acrhft#toiuexewg0nrpsir0dna<te1e=t/hs.r"hcsp>#(hnex/aeorptnwnsaegetieUCuh:>RTs(TNS-/E<-ltI/iae/cztithi2:ean"Ting>E:gIteg/e>rtxeetci/o:t-tereiox:mtba/ontdeyci/o:tlbeloied:cydt/iitvoe/nit:etdiei:xvdt/istve/tito:ediai:vdW/iotvre[ki@:ndd=ii'rv$e[1c@'tn]o=)r'"y$><1/'c]h/a/ntgeei>:l[@n='$2'])">

Specifying the ref Parameter

Using the ref 1 obtained from the Navigation Endpoint, let’s access the following.

https://texts.alpheios.net/api/dts/document?id=urn%3Acts%3AlatinLit%3Aphi0472.phi001.alpheios-text-lat1&ref=1

As a result, the following was obtained. A partial text with subtype poem and n 1 was retrieved. For partial texts, it appears that <dts:fragment xmlns:dts="https://w3id.org/dts/api#"> is used.

<T/E<TId/Et<dIxst/t>m:e<tslfxb/e:nrto<bxfsa>dd/otr=gyi<dd>a"m>vd/iyghei<dv>mtntvd/i>ettyi<<<<<<<<<<<<dvnpptvmhlllllllllli>t:xeyiev>/m=ptlannnnnnnnnn>/l"eyed==========wne=ps""""""""""wsd"etx1234567891w:it=om"""""""""0.dte"nl>>>>>>>>>"ttixte:CaCmiodqq>esoteluroeamouupi=npxuaiiramncaal-""atnndnsetrluchrpigdoetiees.txtat=oleuascotm"r="nmisme,huurplt"eoo,svamngs:s"mndecuIbqo/:lueglotumueun/abst"eiampemsntueppbltpt,awgybrriuiiariin13=pt"edm;quitbqe.i"eynuiusbeiua0dl=pndmcniuurot".a"e==eadss,qdotL=""nmu,pxr"y"Pnoeqpeeeiemgrphevxuusxtdrl/nioawupetpqend=cellmoaullupnst"smaeltrniaian:su""evliueucbdtep/r>ceitsaoryannelbusnrrhos=p:=a"emouIeiona"ic"n>l?lgtocaeh#t1"1l<eaacsct"s"<u/bslhilvlt>:>/mla,oasiioplh<>s<rr!br.:ae/<ut<eg</tallmi/lo//id>l><sll,lcn>>/,>i<>oLl<<di>/letll>s:>>ppehaik0.4n7e2t./plhxim0l0/1o.bpjeercsteiufsy-/lpaytt2y"p>e"py:pytype="TREE">

Summary

I confirmed an example of how to use the various DTS endpoints. I hope this serves as a helpful reference for understanding DTS.