Skip to content
Merged

Test #307

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
scriptshifter/hooks/seq2seq/**/*.csv filter=lfs diff=lfs merge=lfs -text
scriptshifter/hooks/seq2seq/**/*.json filter=lfs diff=lfs merge=lfs -text
scriptshifter/hooks/seq2seq/**/*.pth filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,5 @@ scriptshifter/data/*.db
VERSION
.~lock.*
/data
# Tokenizer data can be rebuilt deterministically within a few seconds.
/scriptshifter/hooks/seq2seq/data/tokenizer/**
27 changes: 21 additions & 6 deletions doc/gen_script_table_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@

import sys
from os import path
from yaml import load
try:
from yaml import CLoader as Loader
except ImportError:
from yaml import Loader


DOCROOT = path.dirname(__file__)

sys.path.append(path.dirname(DOCROOT))
from scriptshifter.tables import list_tables
from scriptshifter.tables import TABLE_DIR, list_tables

REL_TABLE_DIR = "../scriptshifter/tables/data"


with open(path.join(DOCROOT, "supported_scripts_template.md"), "r") as fh:
tpl_data = fh.read()
Expand All @@ -18,13 +27,19 @@
if "alias_of" in data:
fh.write(
f"| `{name}` | {data['label']} | "
f"- | - | [`{data['alias_of']}`]"
f"(../scriptshifter/tables/data/{data['alias_of']}.yml) |\n"
f"[`{data['alias_of']}`]({REL_TABLE_DIR}/{data['alias_of']}.yml)"
f" | - | - | - | -\n"
)
else:
fname = path.join(TABLE_DIR, name + ".yml")
with open(fname, "r") as md_fh:
md = load(md_fh, Loader=Loader)

fh.write(
f"| [`{name}`](../scriptshifter/tables/data/{name}.yml) | "
f"{data['label']} | "
f"| [`{name}`]({REL_TABLE_DIR}/{name}.yml) | "
f"{data['label']} | - | "
f"{'Y' if data.get('has_r2s', False) else 'N'} | "
f"{'Y' if data.get('has_s2r', False) else 'N'} | - |\n"
f"{'Y' if data.get('has_s2r', False) else 'N'} | "
f"{md['general'].get('version', '-')} | "
f"{md['general'].get('date', '-')} \n"
)
324 changes: 164 additions & 160 deletions doc/supported_scripts.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/supported_scripts_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Below are the supported scripts, and supported directionality of those scripts,
"Alias of" means that the script table is the same as the table indicated, only
under a different name.

| Mapping file | Script Name | Roman-to-script | Script-to-roman | Alias of |
| -------- | ------- | ------- | ------- | ------- |
| Mapping file | Script Name | Alias of | Roman-to-script | Script-to-roman | Version | Last updated
| -------- | ------- | ------- | ------- | ------- | ------- | ------- |
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ camel-tools>=1.6
#esupar>=1.9,<2 # For Thai. Needs training. Breaks whole container.
flask>=2.3,<3
flask-cors>=4.0,<5
#funcy>=1.15,<2
funcy>=1.15,<2
piraye>=1.1,<2
#pymarc>=4.0,<5
pymarc>=4.0,<5
python-dotenv>=1.0,<2
pyyaml>=6.0,<7
#regex>=2023.8.8
regex>=2023.8.8
shekar>=1.6,<2
#repackage>=0.7.3
repackage>=0.7.3
setuptools<81 # For yiddish
tokenizers>=0.22
torch>=2.12,<3
Expand Down
3 changes: 3 additions & 0 deletions scriptshifter/hooks/seq2seq/data/normalized/ara/dev.csv
Git LFS file not shown
3 changes: 3 additions & 0 deletions scriptshifter/hooks/seq2seq/data/normalized/ara/train.csv
Git LFS file not shown
6,880 changes: 3 additions & 6,877 deletions scriptshifter/hooks/seq2seq/data/normalized/per/dev.csv

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions scriptshifter/hooks/seq2seq/data/normalized/per/test.csv
Git LFS file not shown
261,314 changes: 3 additions & 261,311 deletions scriptshifter/hooks/seq2seq/data/normalized/per/train.csv

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions scriptshifter/hooks/seq2seq/data/raw/extracted-ara-agg.csv
Git LFS file not shown
3 changes: 3 additions & 0 deletions scriptshifter/hooks/seq2seq/data/raw/extracted-per-agg.csv
Git LFS file not shown
3 changes: 3 additions & 0 deletions scriptshifter/hooks/seq2seq/data/source/ara/dev.csv
Git LFS file not shown
3 changes: 3 additions & 0 deletions scriptshifter/hooks/seq2seq/data/source/ara/test.csv
Git LFS file not shown
3 changes: 3 additions & 0 deletions scriptshifter/hooks/seq2seq/data/source/ara/train.csv
Git LFS file not shown
6,883 changes: 3 additions & 6,880 deletions scriptshifter/hooks/seq2seq/data/source/per/dev.csv

Large diffs are not rendered by default.

6,883 changes: 3 additions & 6,880 deletions scriptshifter/hooks/seq2seq/data/source/per/test.csv

Large diffs are not rendered by default.

261,427 changes: 3 additions & 261,424 deletions scriptshifter/hooks/seq2seq/data/source/per/train.csv

Large diffs are not rendered by default.

Loading
Loading