Metadata-Version: 2.4
Name: hsk-sentences-audio
Version: 1.2.2
Summary: Python loader for 9,931 HSK 3.0 graded Chinese sentences (levels 1–6 and the 7–9 advanced band) with pinyin, glosses, grammar tags, and dual-speed audio URLs.
Author: hsk-sentences-audio contributors
License: MIT (code); CC-BY-SA-4.0 (packaged dataset)
Project-URL: Homepage, https://github.com/no7z/hsk-sentences-audio
Project-URL: Repository, https://github.com/no7z/hsk-sentences-audio
Keywords: hsk,chinese,mandarin,pinyin,language-learning,dataset
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Classifier: Topic :: Education
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# hsk-sentences-audio

Dependency-free Python loader for 9,931 HSK 3.0 graded Chinese sentences:
levels 1–6 plus the combined 7–9 advanced band (stored as `hsk_level: 7`).

```python
from hsk_sentences_audio import audio_url, iter_sentences, load_sentences

print(len(load_sentences()))
card = next(iter_sentences(level=2, topic="food"))
print(card["chinese"], audio_url(card, speed="slow"))
```

The wheel contains the 21 MB JSON dataset, not the ~610 MB audio collection.
Audio URLs default to the repository's hosted `dist/` assets; pass `base_url`
to use your own CDN.

Code is MIT. The packaged dataset is CC-BY-SA-4.0; retain attribution when
redistributing it. Full provenance is in the repository's `ATTRIBUTION.md`.

## Independent exam vocabulary estimates

The existing `hsk_level` keeps its GF0025-2021 meaning. The additive
`exam_vocab_level_2025` is a vocabulary-only estimate against the 2025 exam
syllabus; `7` means the combined 7–9 band, not an individual seventh level.
It does not assess grammar or disambiguate senses/POS. Older records may omit
it; unavailable or incomplete estimates are `null`.

JavaScript: `filterSentences(records, { examVocabLevel: 3 })`.
Python: `iter_sentences(exam_vocab_level=3)`.
Both filters may be combined with the existing authored-level filter.

Maintainers can backfill canonical data without changing existing fields or
regenerating audio:

```bash
python -m pip install -r requirements-exam.txt
python scripts/enrich_exam_levels.py --write
python scripts/enrich_exam_levels.py
python scripts/build_web.py
```

The validation command fails on stale data/metadata or an unreviewed table
package version. Run it after rebuilding sentences. See
`dist/exam_vocab_metadata.json` and `ATTRIBUTION.md` in the source repository.
