Datasets:
Tasks:
Text Classification
Formats:
parquet
Languages:
Ancient Greek (to 1453)
Size:
10K - 100K
License:
Support exact 50-line metre task
Browse files
scripts/build_dataset.py
CHANGED
|
@@ -1828,7 +1828,7 @@ def validate_publication(
|
|
| 1828 |
expected_configs = (
|
| 1829 |
tuple(f"sentence_{suffix}" for suffix in ("1", "10", "50", "100"))
|
| 1830 |
if publication == "sentence"
|
| 1831 |
-
else tuple(f"verse_metre_{suffix}" for suffix in ("1", "10", "100"))
|
| 1832 |
)
|
| 1833 |
assert set(rows_by_config) == set(expected_configs)
|
| 1834 |
report = {}
|
|
|
|
| 1828 |
expected_configs = (
|
| 1829 |
tuple(f"sentence_{suffix}" for suffix in ("1", "10", "50", "100"))
|
| 1830 |
if publication == "sentence"
|
| 1831 |
+
else tuple(f"verse_metre_{suffix}" for suffix in ("1", "10", "50", "100"))
|
| 1832 |
)
|
| 1833 |
assert set(rows_by_config) == set(expected_configs)
|
| 1834 |
report = {}
|
scripts/build_sqlite_mirror.py
CHANGED
|
@@ -219,7 +219,7 @@ def main() -> None:
|
|
| 219 |
suffixes = (
|
| 220 |
("1", "10", "50", "100")
|
| 221 |
if args.publication == "sentence"
|
| 222 |
-
else ("1", "10", "100")
|
| 223 |
)
|
| 224 |
CONFIGS = tuple(f"{base}_{suffix}" for suffix in suffixes)
|
| 225 |
if not args.check:
|
|
|
|
| 219 |
suffixes = (
|
| 220 |
("1", "10", "50", "100")
|
| 221 |
if args.publication == "sentence"
|
| 222 |
+
else ("1", "10", "50", "100")
|
| 223 |
)
|
| 224 |
CONFIGS = tuple(f"{base}_{suffix}" for suffix in suffixes)
|
| 225 |
if not args.check:
|
scripts/dataset_variants.py
CHANGED
|
@@ -24,7 +24,7 @@ BASE_CONFIGS = ("sentence", "verse_metre")
|
|
| 24 |
SPLITS = ("train", "validation", "test")
|
| 25 |
CHUNK_TARGETS_BY_BASE = {
|
| 26 |
"sentence": (10, 50, 100),
|
| 27 |
-
"verse_metre": (10, 100),
|
| 28 |
}
|
| 29 |
BOTTLENECK_TARGET = 100
|
| 30 |
CHUNKING_SEED = 776
|
|
|
|
| 24 |
SPLITS = ("train", "validation", "test")
|
| 25 |
CHUNK_TARGETS_BY_BASE = {
|
| 26 |
"sentence": (10, 50, 100),
|
| 27 |
+
"verse_metre": (10, 50, 100),
|
| 28 |
}
|
| 29 |
BOTTLENECK_TARGET = 100
|
| 30 |
CHUNKING_SEED = 776
|
scripts/validate_publication.py
CHANGED
|
@@ -42,7 +42,7 @@ def normalize(value: str) -> str:
|
|
| 42 |
|
| 43 |
def configs(publication: str) -> tuple[str, ...]:
|
| 44 |
base = "sentence" if publication == "sentence" else "verse_metre"
|
| 45 |
-
suffixes = (1, 10, 50, 100)
|
| 46 |
return tuple(f"{base}_{suffix}" for suffix in suffixes)
|
| 47 |
|
| 48 |
|
|
|
|
| 42 |
|
| 43 |
def configs(publication: str) -> tuple[str, ...]:
|
| 44 |
base = "sentence" if publication == "sentence" else "verse_metre"
|
| 45 |
+
suffixes = (1, 10, 50, 100)
|
| 46 |
return tuple(f"{base}_{suffix}" for suffix in suffixes)
|
| 47 |
|
| 48 |
|
tests/test_conllu_well_formed.py
CHANGED
|
@@ -15,7 +15,7 @@ DATA_ROOT = REPO_ROOT / "data"
|
|
| 15 |
METRE_DATA_ROOT = REPO_ROOT.parent / "sphragis-metre" / "data"
|
| 16 |
CONFIGS = tuple(
|
| 17 |
[(DATA_ROOT, f"sentence_{suffix}") for suffix in ("1", "10", "50", "100")]
|
| 18 |
-
+ [(METRE_DATA_ROOT, f"verse_metre_{suffix}") for suffix in ("1", "10", "100")]
|
| 19 |
)
|
| 20 |
SAFE_MISC_KEYS = {"NativeRel", "NativeHead", "HeadRepair", "SpaceAfter"}
|
| 21 |
|
|
|
|
| 15 |
METRE_DATA_ROOT = REPO_ROOT.parent / "sphragis-metre" / "data"
|
| 16 |
CONFIGS = tuple(
|
| 17 |
[(DATA_ROOT, f"sentence_{suffix}") for suffix in ("1", "10", "50", "100")]
|
| 18 |
+
+ [(METRE_DATA_ROOT, f"verse_metre_{suffix}") for suffix in ("1", "10", "50", "100")]
|
| 19 |
)
|
| 20 |
SAFE_MISC_KEYS = {"NativeRel", "NativeHead", "HeadRepair", "SpaceAfter"}
|
| 21 |
|
tests/test_split_stratification.py
CHANGED
|
@@ -17,7 +17,7 @@ METRE_ROOT = REPO_ROOT.parent / "sphragis-metre"
|
|
| 17 |
SPLITS = ("train", "validation", "test")
|
| 18 |
PUBLICATIONS = (
|
| 19 |
(REPO_ROOT, "sentence", (1, 10, 50, 100)),
|
| 20 |
-
(METRE_ROOT, "verse_metre", (1, 10, 100)),
|
| 21 |
)
|
| 22 |
TREEBANK_SOURCES = {
|
| 23 |
"agdt", "ud_perseus", "ud_proiel", "ud_ptnk", "gorman", "pedalion",
|
|
|
|
| 17 |
SPLITS = ("train", "validation", "test")
|
| 18 |
PUBLICATIONS = (
|
| 19 |
(REPO_ROOT, "sentence", (1, 10, 50, 100)),
|
| 20 |
+
(METRE_ROOT, "verse_metre", (1, 10, 50, 100)),
|
| 21 |
)
|
| 22 |
TREEBANK_SOURCES = {
|
| 23 |
"agdt", "ud_perseus", "ud_proiel", "ud_ptnk", "gorman", "pedalion",
|
tests/test_verse_character_coverage.py
CHANGED
|
@@ -29,7 +29,7 @@ def normalized_character_count(root: Path, config: str) -> int:
|
|
| 29 |
def test_each_publication_has_equal_character_counts_across_task_sizes() -> None:
|
| 30 |
publications = (
|
| 31 |
(REPO_ROOT, "sentence", (1, 10, 50, 100)),
|
| 32 |
-
(REPO_ROOT.parent / "sphragis-metre", "verse_metre", (1, 10, 100)),
|
| 33 |
)
|
| 34 |
for root, genre, suffixes in publications:
|
| 35 |
counts = {
|
|
|
|
| 29 |
def test_each_publication_has_equal_character_counts_across_task_sizes() -> None:
|
| 30 |
publications = (
|
| 31 |
(REPO_ROOT, "sentence", (1, 10, 50, 100)),
|
| 32 |
+
(REPO_ROOT.parent / "sphragis-metre", "verse_metre", (1, 10, 50, 100)),
|
| 33 |
)
|
| 34 |
for root, genre, suffixes in publications:
|
| 35 |
counts = {
|