Welcome to our comprehensive guide on the Text Encoding Initiative (TEI)! In this lesson, we'll dive deep into the world of TEI, a standard for encoding texts in a machine-readable format. Let's get started!
TEI is a consortium that develops and maintains a set of guidelines for encoding texts in XML (eXtensible Markup Language). These guidelines provide a common standard for encoding texts for scholarly research, digital libraries, and museums.
TEI allows us to encode texts in a way that is both human-readable and machine-readable. This is crucial for digital humanities projects, where texts are often analyzed by computers. TEI provides a consistent and reliable way to represent the structure and content of a text.
TEI is not just for scholars and researchers. It can be used by anyone who needs to encode texts for digital publishing or archiving, such as writers, publishers, and archivists.
A typical TEI document consists of the following parts:
TEI Header (<teiHeader>): Contains metadata about the document, such as title, author, publication information, and encoding information.
Text (<text>): The main body of the document, containing the actual text.
TEI Trailers (<teiCorpus>, <teiEncodingDescription>, <back>): Contains additional information about the document and its encoding.
Always include a TEI Header and a Text section in your TEI documents.
Let's look at a simple example of a TEI document encoding a poem by Emily Dickinson:
<teiHeader>
<fileDesc>
<titleStmt>
<title>A narrow Fellow in the Grass</title>
<author>Emily Dickinson</author>
</titleStmt>
</fileDesc>
</teiHeader>
<text>
<body>
<p>
A narrow Fellow in the Grass
Occasionally rides;
</p>
<p>
You may have met Himβdid you not?
His notice sudden isβ
</p>
<p>
The Grass with Nettles on it like the Bee,
A speckled Snakeβ
</p>
</body>
</text>In this example, we've encoded the title, author, and poem text. Notice how we've used the <title>, <author>, and <p> elements to represent the title, author, and poem lines, respectively.
What is the main purpose of TEI?
Stay tuned for more on TEI, including advanced topics and practical examples! ππ