Python Folder

Python script files.

After we create clean digital text for each page of the source text, we still have several critical changes to make to them before they can be used as digital edition masters. Both of these changes are done using a Python script.

  1. ABBYY FineReader outputs each individual page as a separate file. We need this format in order to create the original page numbers in the digital edition, but we do not want the edition to consist of individual pages. For the Encyclopedia, the entry is the basic unit of meaning, not page. We use Python to concatenate all of the page files into a single file, with pages correctly numbered. Python then separates the files every time it encounters a new entry title. In the end, we have a single file for each entry, with page breaks and original page number clearly marked. We call these new files entry files.
  2. Footnotes in the print edition appear at the end of the page. Since a digital edition is not print-based and does not have separate pages, this format does not make sense. Instead, we follow the guidelines of the TEI and move the note text into the body text at the point of attachment (i.e., where the original footnote reference appeared). Note text is surrounded by the <note> tag and can be displayed in any form needed in the digital edition.
  3. Early editions use the long-s, and so the word possible is printed as poſſible. OCR programs often reproduce this as poffible, because ſ looks like f. Correcting these problems is complex; the English language has many words like few and sew, where the the context is the only way to know for sure whether the original was f or ſ. We use a Python script to resolve most of these difficulties by combining a dictionary with rules about context to automate most of the corrections.