-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first pass adding other Crito translations
- Loading branch information
Showing
9 changed files
with
1,492 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
267 changes: 267 additions & 0 deletions
267
backend/data/library/tlg0059/tlg003/tlg0059.tlg003.perseus-eng1.txt
Large diffs are not rendered by default.
Oops, something went wrong.
267 changes: 267 additions & 0 deletions
267
backend/data/library/tlg0059/tlg003/tlg0059.tlg003.perseus-eng2.txt
Large diffs are not rendered by default.
Oops, something went wrong.
60 changes: 30 additions & 30 deletions
60
backend/data/library/tlg0059/tlg003/tlg0059.tlg003.perseus-far1.txt
Large diffs are not rendered by default.
Oops, something went wrong.
268 changes: 268 additions & 0 deletions
268
backend/data/library/tlg0059/tlg003/tlg0059.tlg003.perseus-far2.txt
Large diffs are not rendered by default.
Oops, something went wrong.
267 changes: 267 additions & 0 deletions
267
backend/data/library/tlg0059/tlg003/tlg0059.tlg003.perseus-ger1.txt
Large diffs are not rendered by default.
Oops, something went wrong.
268 changes: 268 additions & 0 deletions
268
backend/data/library/tlg0059/tlg003/tlg0059.tlg003.perseus-kur1.txt
Large diffs are not rendered by default.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
backend/data/raw/crito-shamsian/prep_other_translations.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import csv | ||
from pathlib import Path | ||
|
||
|
||
def output_flat_text(column_name, output_path): | ||
input_path = Path("wegner-corrected-finalized-versions.csv") | ||
|
||
with input_path.open(encoding="utf-8-sig") as f: | ||
reader = csv.DictReader(f) | ||
rows = [r for r in reader] | ||
|
||
with output_path.open("w") as output_file: | ||
for row in rows: | ||
ref = row["Title3"].rsplit("|", maxsplit=1)[1].split("Cr.")[1].strip(".").strip() | ||
if row[column_name].strip(): | ||
print(f"{ref}. {row[column_name].strip()}", file=output_file) | ||
|
||
output_flat_text("English", Path("../../library/tlg0059/tlg003/tlg0059.tlg003.perseus-eng1.txt")) | ||
output_flat_text("Benjamin Jowett", Path("../../library/tlg0059/tlg003/tlg0059.tlg003.perseus-eng2.txt")) | ||
output_flat_text("Schleiermacher", Path("../../library/tlg0059/tlg003/tlg0059.tlg003.perseus-ger1.txt")) | ||
output_flat_text("Primary translation", Path("../../library/tlg0059/tlg003/tlg0059.tlg003.perseus-far1.txt")) | ||
output_flat_text("Literal translation", Path("../../library/tlg0059/tlg003/tlg0059.tlg003.perseus-far2.txt")) | ||
output_flat_text("Secondary translation", Path("../../library/tlg0059/tlg003/tlg0059.tlg003.perseus-kur1.txt")) |
5 changes: 2 additions & 3 deletions
5
backend/data/raw/crito-shamsian/wegner-corrected-finalized-versions.csv
Large diffs are not rendered by default.
Oops, something went wrong.