Text Encoding Initiative
The Text Encoding Initiative (TEI) is a text-centric community of practice in the academic field of digital humanities, operating continuously since the 1980s. The community currently runs a mailing list, meetings and conference series, and maintains the TEI technical standard, a journal,[1] a wiki, a GitHub repository and toolchains for processing files and customizing the TEI framework.
TEI guidelines
[edit ]The TEI Guidelines collectively define an encoding standard currently serialized as an XML format. Many of its recommendations were previously expressed using and recommending use of SGML and it may allow formats other than XML in the future.[2] The TEI Guidelines form the basis of and are the defining output of this community of practice. The format is more of a framework and differs from other well-known open formats for text (such as HTML and OpenDocument) in that it is primarily semantic rather than presentational and users can customize the TEI for their own needs. The semantics and interpretation of every tag and attribute are specified. There are over 580 individual elements representing different textual components and concepts: word,[3] sentence,[4] character,[5] glyph,[6] person,[7] etc. In many cases general purpose elements such as damage[8] but are then semantically extended through a series of attributes such as 'agent', 'degree', or 'extent', to provide more context for the damage. The methods of recording the user's interpretation of the textual phenomena are often grounded in one or more academic disciplines and detailed sections of the TEI Guidelines explain them with numerous examples.
Technical details
[edit ]The standard is split into two parts, a discursive textual description with extended examples and discussion and set of tag-by-tag definitions. Schemata in most of the modern formats (DTD, RELAX NG and XML Schema (W3C)) are generated automatically from the tag-by-tag definitions. A number of tools support the production of the guidelines and the application of the guidelines to specific projects.
A number of elements can be used to document the presence of glyphs not present in Unicode such as glyph.[9] , char.[10] , or charDecl.[11] This enables encoders to document non-Unicode characters present in their texts, but the TEI Guidelines encourage users to first check whether this is necessary.[12] The TEI Guidelines also include documentation on how to make use of the Unicode Private Use Areas.[13]
Most users of the format do not use the complete range of elements, but produce a customisation using a project-specific subset of the tags and attributes defined by the Guidelines. The TEI defines a sophisticated customization mechanism known as ODD for this purpose. In addition to documenting and describing each TEI tag, an ODD specification specifies its content model and other usage constraints, which may be expressed using schematron.
TEI Lite is an example of such a customization. It defines an XML-based file format for exchanging texts. It is a manageable selection from the extensive set of elements available in the full TEI Guidelines.
As an XML-based format, TEI cannot directly deal with overlapping markup and non-hierarchical structures. A variety of options to represent this sort of data is suggested by the guidelines.[14]
Examples
[edit ]The text of the TEI guidelines is rich in examples. There is also a samples page on the TEI wiki,[15] which gives examples of real-world projects that expose their underlying TEI.
Prose tags
[edit ]TEI allows texts to be marked up syntactically at any level of granularity, or mixture of granularities. For example, this paragraph (p) has been marked up into sentences (s) and clauses (cl).[16]
<p> <s> <cl>ItwasaboutthebeginningofSeptember,1664, <cl>thatI,amongtherestofmyneighbours, heardinordinarydiscourse <cl>thattheplaguewasreturnedagaintoHolland;</cl> </cl> </cl> <cl>forithadbeenveryviolentthere,andparticularlyat AmsterdamandRotterdam,intheyear1663,</cl> <cl>whither,<cl>theysay,</cl>itwasbrought, <cl>somesaid</cl>fromItaly,othersfromtheLevant,amongsomegoods <cl>whichwerebroughthomebytheirTurkeyfleet;</cl> </cl> <cl>otherssaiditwasbroughtfromCandia; othersfromCyprus.</cl> </s> <s> <cl>Itmatterednot<cl>fromwhenceitcame;</cl> </cl> <cl>butallagreed<cl>itwascomeintoHollandagain.</cl> </cl> </s> </p>
Verse
[edit ]TEI has tags for marking up verse. This example (taken from the French translation of the TEI Guidelines) shows a sonnet.[17]
<divtype="sonnet"> <lgtype="quatrain"> <l>Lesamoureuxferventsetlessavantsaustères</l> <l>Aimentégalement,dansleurmûresaison,</l> <l>Leschatspuissantsetdoux,orgueildelamaison,</l> <l>Quicommeeuxsontfrileuxetcommeeuxsédentaires.</l> </lg> <lgtype="quatrain"> <l>Amisdelascienceetdelavolupté</l> <l>Ilscherchentlesilenceetl'horreurdesténèbres;</l> <l>L'Érèbeleseûtprispoursescoursiersfunèbres,</l> <l>S'ilspouvaientauservageinclinerleurfierté.</l> </lg> <lgtype="tercet"> <l>Ilsprennentensongeantlesnoblesattitudes</l> <l>Desgrandssphinxallongésaufonddessolitudes,</l> <l>Quisemblents'endormirdansunrêvesansfin;</l> </lg> <lgtype="tercet"> <l>Leursreinsfécondssontpleinsd'étincellesmagiques,</l> <l>Etdesparcellesd'or,ainsiqu'unsablefin,</l> <l>Étoilentvaguementleursprunellesmystiques.</l> </lg> </div>
Choice tag
[edit ]The choice tag is used to represent sections of text that might be encoded or tagged in more than one possible way. In the following example, based on one in the standard, choice is used twice, once to indicate an original and a corrected number, and once to indicate an original and regularised spelling.[18]
<pxml:id="p23">Lastly,That,uponhissolemnoathtoobservealltheabove articles,thesaidman-mountainshallhaveadailyallowanceof meatanddrinksufficientforthesupportof<choice> <sic>1724</sic> <corr>1728</corr> </choice>ofoursubjects, withfreeaccesstoourroyalperson,andothermarksofour <choice> <orig>favour</orig> <reg>favor</reg> </choice>.
ODD
[edit ]One Document Does it all ("ODD") is a literate programming language for XML schemas.[19] [20] [21] [22]
In literate-programming style, ODD documents combine human-readable documentation and machine-readable models using the Documentation Elements module of the Text Encoding Initiative. Tools generate localised and internationalised HTML, EPUB, or PDF human-readable output and DTDs, W3C XML Schema, Relax NG Compact Syntax, or Relax NG XML Syntax machine-readable output.
The Roma web application[23] is built around the ODD format and can use it to generate schemas in DTD, W3C XML Schema, Relax NG Compact Syntax, or Relax NG XML Syntax formats, as used by many XML validation tools and services.
ODD is the format used internally by the Text Encoding Initiative for the TEI technical standard.[24] Although ODD files generally describe the difference between a customized XML format and the full TEI model, ODD also can be used to describe XML formats that are entirely separate from the TEI. One example of this is the W3C's Internationalization Tag Set which uses the ODD format to generate schemas and document its vocabulary.[25] [26]
TEI customizations
[edit ]TEI customizations are specializations of the TEI XML specification for use in particular fields or by specific communities.
- EpiDoc (Epigraphic Documents)
- Charters Encoding Initiative[27]
- Medieval Nordic Text Archive (Menota)[28]
Customization in the TEI is done through the ODD mechanism mentioned above. In truth since its P5 version, all so-called 'TEI Conformant' uses of the TEI Guidelines are based on a TEI customization documented in a TEI ODD file. Even when users choose one of the off-the-shelf pre-generated schemas to validate against, these have been created from freely available customization files.
Projects
[edit ]The format is used by many projects worldwide. GitHub contains more than 2 million TEI XML files.[29] Practically all projects are associated with one or more universities. Some well-known projects that encode texts using TEI include:
History
[edit ]Prior to the creation of TEI, humanities scholars had no common standards for encoding electronic texts in a manner that would serve their academic goals (Hockey 1993, p. 41). In 1987, a group of scholars representing fields in humanities, linguistics, and computing convened at Vassar College to put forth a set of guidelines known as the "Poughkeepsie Principles". These guidelines directed the development of the first TEI standard, "P1".[30] [31]
- 1987 – Work started by the Association for Computers and the Humanities,[32] the Association for Computational Linguistics, and the Association for Literary and Linguistic Computing on what would become the TEI.[33] This culminated in the Closing statement of the Vassar Planning Conference.[34]
- 1994 – TEI P3 released,[35] co-edited by Lou Burnard (at Oxford University) and Michael Sperberg-McQueen (then at the University of Illinois at Chicago, later at the W3C).
- 1999 – TEI P3 updated.
- 2002 – TEI P4 released, moving from SGML to XML; adoption of Unicode, which XML parsers are required to support.[36]
- 2007 – TEI P5 released, including integration with the
xml:langandxml:idattributes from the W3C[37] (these had previously been attributes in the TEI namespace), regularization of local pointing attributes to use the hash (as used in HTML) and unification of the ptr and xptr tags. Together these changes with many more new additions make P5 more regular and bring it closer to current xml practice as promoted by the W3C and as used by other XML variants. Maintenance and feature update versions of TEI P5 have been released at least twice a year since 2007. - 2011 – TEI P5 v2.0.1 released with support for genetic editing [38] (among many other additions, the genetic-editing features allow encoding of texts without interpretation as to their specific semantics).
- 2017 – TEI was awarded the Antonio Zampolli Prize from the Alliance of Digital Humanities Organizations.[39]
References
[edit ]- ↑ "Journal of the Text Encoding Initiative". Open Edition Journals. Retrieved 29 June 2022.
- ↑ Cummings, James (1 December 2019). "A world of difference: Myths and misconceptions about the TEI". Digital Scholarship in the Humanities. 34 (Supplement_1): i58–i79. doi:10.1093/llc/fqy071.
- ↑ "TEI element w (word)". tei-c.org.
- ↑ "TEI element s (s-unit)". tei-c.org.
- ↑ "TEI element c (character)". tei-c.org.
- ↑ "TEI element g (character or glyph)". tei-c.org.
- ↑ "TEI element person (person)". tei-c.org.
- ↑ "TEI element damage (damage)". tei-c.org.
- ↑ "Element glyph". www.tei-c.org.
- ↑ "Element glyph". www.tei-c.org.
- ↑ "Element charDecl". www.tei-c.org.
- ↑ "Is Your Journey Really Necessary?". www.tei-c.org.
- ↑ "How to Use Code Points from the Private Use Area". www.tei-c.org.
- ↑ "20 Non-hierarchical Structures - TEI P5: — Guidelines for Electronic Text Encoding and Interchange". tei-c.org. 2019. Retrieved 19 March 2019.
- ↑ "Samples of TEI texts". wiki.tei-c.org. 2011. Retrieved 17 April 2012.
- ↑ "17 Simple Analytic Mechanisms - TEI P5: — Guidelines for Electronic Text Encoding and Interchange". tei-c.org. 2012. Retrieved 15 April 2012.
- ↑ "TEI element lg (groupe de vers)". tei-c.org. 2012. Archived from the original on 6 June 2012. Retrieved 15 April 2012.
- ↑ "TEI element choice". tei-c.org. 2012. Retrieved 15 April 2012.
- ↑ Bauman, Syd; Flanders, Julia (2004). ODD customizations. Extreme Markup Languages 2004. Archived from the original on 2012年03月29日. Retrieved 2012年04月15日.
- ↑ Burnard, Lou; Rahtz, Sebastian (2004). RelaxNG with Son of ODD. Extreme Markup Languages 2004. Archived from the original on 2012年03月29日. Retrieved 2012年04月15日.
- ↑ Reiss, Kevin M. (2007). Literate Documentation for XML (PDF). Digital Humanities 2007. Urbana-Champaign, Illinois. Archived from the original (PDF) on 2016年03月03日. Retrieved 2012年04月15日.
- ↑ Burnard, Lou; Rahtz, Sebastian (June 2013). "A complete schema definition language for the Text Encoding Initiative". XML London 2013 14: 152–161. doi:10.14337/XMLLondon13.Rahtz01 (inactive 12 July 2025). ISBN 978-0-9926471-0-0.
{{cite journal}}: CS1 maint: DOI inactive as of July 2025 (link) - ↑ Roma web application
- ↑ Burnard, Lou; Bauman, Syd, eds. (2007). "TEI P5: Guidelines for Electronic Text Encoding and Interchange". Charlottesville, Virginia, USA: TEI Consortium.
- ↑ Lieske, Christian; Sasaki, Felix, eds. (3 April 2007). "Internationalization Tag Set (ITS) Version 1.0". World Wide Web Consortium. §1.5 Development of this specification.
- ↑ Savourel, Yves; Kosek, Jirka; Ishida, Richard, eds. (2008). "Best Practices for XML Internationalization". W3C Working Group. 5.2 ITS and TEI.
- ↑ "Charters Encoding Initiative - Ludwig-Maximilians-Universität München". www.cei.lmu.de.
- ↑ "Medieval Nordic Text Archive (Menota)". www.menota.org.
- ↑ See <https://teihub.netlify.app/> which searches GitHub for TEI XML files.
- ↑ Ahronheim, J.R. (1998). "Descriptive metadata: Emerging standards". Journal of Academic Librarianship. 24 (5): 395–403. doi:10.1016/S0099-1333(98)90079-9.
- ↑ Cantara, L. (2005). "The text-encoding initiative: Part 1". OCLC Systems & Services. 21 (1): 36–39. doi:10.1108/10650750510578136.
- ↑ "The Association for Computers and the Humanities |". ach.org.
- ↑ "Historical background", section iv.2 of TEI P5: Guidelines for Electronic Text Encoding and Interchange.
- ↑ "Closing statement of the Vassar Planning Conference". tei-c.org. 2009. Retrieved 15 April 2012.
- ↑ "TEI Guidelines" . Retrieved 2010年06月18日.
- ↑ "2". XML Basics. Archived from the original on 2011年07月09日. Retrieved 2011年07月09日.
- ↑ "Extensible Markup Language (XML) 1.0 (Fifth Edition)". w3.org.
- ↑ "P5 version 2.0.1 release notes". tei-c.org. 2012. Retrieved 15 April 2012.
- ↑ "TEI: Text Encoding Initiative".
External links
[edit ]- TEI Consortium Web site with:
- a list of TEI projects Archived 2008年08月28日 at the Wayback Machine ;
- a form for adding your project Archived 2017年03月05日 at the Wayback Machine ;
- a wiki Archived 2008年09月08日 at the Wayback Machine ;
- the Journal of the TEI Archived 2019年01月18日 at the Wayback Machine ; and
- TEI Lite: An Introduction to Text Encoding for Interchange. Archived 2007年09月27日 at the Wayback Machine .
- TEI @ Oxford (hosted at Oxford University) with development and backup versions of much of the core content. Archived 2021年04月13日 at the Wayback Machine .
- TEI GitHub site (hosted at GitHub) with repository and issue tracker
- Larger list of TEI Projects
- What is the TEI? (Introductory overview by Lou Burnard)