Skip to content

langeslag/oe-corpus-tools

Repository files navigation

oe-corpus-tools

Processing tools for various Old English text corpora and resources.

Disclaimer

The tools here provided have been developed and made available with no affiliation to any of the projects whose resources they evaluate. They merely provide users who have acquired these resources with ways to process data already lawfully in their possession.

Attested Spellings

attsp.py has now replaced attsp.sh. If run from a folder with a subfolder doe/ containing the entries of the 2017 DOE A–H CD-ROM release in HTML format, it will extract and store (1) the lemma, (2) the part of speech, (3) the line reporting on the number of attestations, and (4) each attested spelling on its own line in a corresponding plaintext file for convenient grep access. It also outputs attsp.json and attsp_inverted.json for ease of programmatic access.

find_mne_forms.py is a helper script that determines which tokens in the DOE attested spellings fields are Modern English forms, and whether they overlap with forms attested for any Old English words. It requires the output JSON of attsp.sh as input and generates pde.json, but since the latter ships with the present repository, you will not normally need to generate it yourself.

Part-of-Speech Labels

ycoe_pos.py extracts simplified POS labels for each form attested in YCOE (assumed to reside in a subfolder ycoe/), outputting two JSON files: one with multiple labels, ranked for frequency, where applicable, and one with just the top-ranking label, merged with the second-ranking label if a certain distribution criterion is met.

XSLT Transformation Stylesheets

The folder stylesheets/ currently contains a single, very basic XSLT stylesheet for transforming DOEC to plaintext, as a way of giving non-experts something to work with.

Research Data

The folder research_data/ is reserved for scripts generating data referenced in my published research. At the moment, it contains the following project:

Hebban olla uogala

The scripts in the subfolder uogala/ facilitate the reproducibility of work reported in my article "The Case Against English Elements in Hebban olla uogala" (forthcoming in Amsterdamer Beiträge zur älteren Germanistik):

  • h-prothesis.py: If placed in a folder whose grandparent folder contains (1) attsp.json as generated by the abovementioned scripts as well as (2) a folder doec-plaintext/ containing a plaintext transformation of DOEC (or any other corpus of Old English) that has been stripped of all <foreign> content, this script will output (1) a plaintext file h-prothesis.txt listing all headwords beginning in a or ā that have attested spellings starting in h, each with a list of such forms; and (2) a plaintext file h-prothesis-doec.txt returning all occurrences of these spellings in the corpus provided.

  • levelling.py: this script has a few dependencies I'm still working on integrating into this repository, and the script itself is not final, stay tuned. But it serves to extract common nouns ending in "es" or "as" in a format for convenient manual classification.

License Notice

oe-corpus-tools is Copyright 2025 P. S. Langeslag.

oe-corpus-tools is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

oe-corpus-tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with oe-corpus-tools. If not, see https://www.gnu.org/licenses/.

About

Scripts evaluating various Old English corpora

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors