Skip to content

Add literary_form migration bot#446

Open
modi02 wants to merge 2 commits intointernetarchive:masterfrom
modi02:tags/literary-form-migration
Open

Add literary_form migration bot#446
modi02 wants to merge 2 commits intointernetarchive:masterfrom
modi02:tags/literary-form-migration

Conversation

@modi02
Copy link
Copy Markdown

@modi02 modi02 commented Apr 16, 2026

literary_form migration bot for the Tag Cleanup GSoC project.

This implements the first stage of the genre taxonomy work: classifying Open Library works as Fiction or Nonfiction based on existing subject strings.

Files:

  • migrate_subjects.py - classification script with conflict resolution logic
  • mappings/literary_form.json - subject string to literary_form mappings
  • mappings/droppable.json - noise strings to strip before classification
  • literary_form_dry_run.jsonl - dry-run output on 100 works (awaiting mentor review)
  • README.md - full documentation and design decisions

Coverage: 29.26% of full corpus (11.9M works) based on initial analysis of 40.79M works dump.

Dry-run results: 97 Fiction, 3 Nonfiction on 100 test works. Both Nonfiction results manually verified as correct (Richard Jefferies biography, Nobel Peace Prize winners biography).

Next steps: Awaiting mentor review of dry-run JSONL before any production writes. @hornc review required before bulk migration (>100 records).

cc @mekarpeles

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