Repository navigation
test(audience): add classifier tests and pilot key list for Step 3 - #64
shoaib-inamdar wants to merge 1 commit into
Conversation
Adds 41 tests covering the audience tag type classifier: - 18 direct-mapping tests (all 9 vocabulary slugs) - 11 pattern-matching tests (grade bands, LCSH suffix, preschool, reading-level exclusion) - 9 edge-case tests (empty input, non-strings, case-insensitivity, whitespace, source provenance, no-match cases) - 3 Harry Potter integration tests Also adds scripts/logs/audience_pilot_keys.txt: 50 OL work IDs for the Step 3 dry-run pilot, covering a broad spread of audience slugs (juvenile, children, young-adult, preschool, academic). All 41 tests pass. Closes Open-Book-Genome-Project#62 | Parent: Open-Book-Genome-Project#52 cc @mekarpeles @Chisomnwa
|
@mekarpeles , @Chisomnwa , I have done the Step 3 , Let me know if any changes are needed |
|
Hi @shoaib-inamdar, thanks for putting this together and for adding the Audience classifier tests. I compared it with the Step 3 issue and the genre pilot in PR #44. This is a useful start, but this PR doesn’t yet show that the 50-work backfill pilot was run, so I can’t sign off on Step 3 or move us to Step 4 yet. Could you update the PR with the pilot process and results described in Issue #62? In particular:
Also, please change “Closes #62” to “Refs #62” for now, so this PR doesn’t close the Step 3 issue before the pilot results are reviewed. Once the run and checks are documented, I’ll review it with you and we can decide whether to move to Step 4. |
Summary
Adds the test suite and pilot key list for Issue #62 (Step 3 — Pilot Run).
No production code changed. This PR adds two new files only.
Files Added
tests/test_audience_classify.py— 41 tests, all pass ✅Mirrors the structure of
test_literary_form_classify.py. Covers:TestDirectMappingAudienceTestPatternMatchingAudienceTestAudienceEdgeCasesTestAudienceIntegrationHarryPotterNote on
test_deduplication: The classifier intentionally returns oneTagMatchper matched subject string (preserving source provenance), consistent with how
genresandliterary_formclassifiers behave. The test was updated to assertthe correct behavior — unique sources, not unique slugs.
scripts/logs/audience_pilot_keys.txt50 OL work IDs selected for the Step 3 dry-run, covering a broad spread of
audience slugs: juvenile, children, young-adult, preschool, and academic.
Refs #62 | Parent: #52
cc @mekarpeles @Chisomnwa