Skip to content

feat(data): Tashkeela++ fetcher, rebased onto current main (modernizes #1) - #185

Merged
ronaldtse merged 2 commits into
mainfrom
feat/tashkeela-fetcher-mod
Sep 5, 2026
Merged

feat(data): Tashkeela++ fetcher, rebased onto current main (modernizes #1)#185
ronaldtse merged 2 commits into
mainfrom
feat/tashkeela-fetcher-mod

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Modernization of #1 (the Tashkeela++ fetcher, month-stale): rebased cleanly onto current main (the original branch was 30+ commits behind), ruff green, tests are network-free by design (import + local-parsing coverage only).

No content changes to the owner's commits — this is the same two commits (HF fetcher + the arbml/tashkeelav2 switch), replayed on current main so CI can run. If green, merge this and #1 can be closed as superseded-by-rebase, or this branch pushed to the original head.

Ronald Tse added 2 commits September 5, 2026 12:45
Replaces the env-var placeholder in scripts/fetch_data.sh with a
proper Python fetcher that knows the canonical dataset locations.

Primary source: Misraj/Sadeed_Tashkeela — gated, requires HF_TOKEN.
Fallback: community-datasets/tashkeela — GPLv2 open access.

The fetcher streams parquet → one-line-per-chunk text, skips blank
and overlong lines, writes atomically via .tmp rename, and exits
with a clear error message on gated-repo failures (including the
URL the user must visit to grant access).

Also adds pythonpath = ["src", "."] to pytest config so tests run
without pip install -e ., and pyarrow>=15.0 to [publish] extras.

Smoke-tested end-to-end: fetch 100 lines → RababaArabicData
consumes them → (bare, diacritized) pairs ready for StudentTrainer.
Drops Misraj/Sadeed_Tashkeela (gated, requires manual approval) as the
primary source. Replacement: arbml/tashkeelav2 — open-access, pre-split
into train/test, and pre-paired (each row has both `text` and
`diacratized` columns). No HF_TOKEN, no acceptance click-through.

Output format is now TSV with two columns: `bare<TAB>diacritized`. The
data module reads both directly — no in-pipeline stripping needed, and
the dataset's canonical letter forms are preserved. Falls back to the
legacy single-text path (.txt + strip_diacritics) when only raw
community-datasets/tashkeela is available.

Layout:
  primary   = arbml/tashkeelav2 (TSV, open)
  fallback  = community-datasets/tashkeela (TXT, GPLv2 raw)

New tests:
- fetcher primary is open + uses TSV
- fetcher fallback still uses raw text path
- data module reads TSV pairs (bare+diacritized)
- data module falls back to legacy .txt when no TSV
- data module prefers TSV when both exist

46 tests pass; smoke-tested against arbml/tashkeelav2 end-to-end.
@ronaldtse
ronaldtse merged commit 15e8354 into main Sep 5, 2026
11 checks passed
@ronaldtse
ronaldtse deleted the feat/tashkeela-fetcher-mod branch September 5, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant