Skip to content

Conversation

@wjbmattingly
Copy link
Contributor

Adds support for ISNI as a new source in Lux. This PR's mapper allows you to map individual records to Lux from ISNI. To get the data in the correct format, however, you will want to look at the downloader, which handles converting the ISNI JSONLD format into standard JSONLD while also trimming down the data to the core components necessary. This also reduces the file size from 20Gb to ~13GB for people, for example.

- Implement ISNIDownloader that fixes JSON-LD structure issues:
  - Removes control characters (\x1e, \x1f, \x1d) that break JSON parsing
  - Converts array of separate JSON-LD objects to single proper JSON-LD document
  - Consolidates multiple @context definitions into one
  - Combines all @graph entities into a single array
- Maintains original data format while making it parseable by standard JSON-LD libraries
- Compatible with actual BaseDownloader interface (overrides process method)
- Add comprehensive test workflow that validates the complete pipeline
- Successfully tested with real ISNI data: 1.8M records → 5.5M entities
- Achieves 7% file size reduction while fixing structure
…memory. mapper is now built and ready for testing.
@wjbmattingly wjbmattingly changed the title Isni Adding ISNI as a Source Jul 25, 2025
@wjbmattingly
Copy link
Contributor Author

wjbmattingly commented Jul 28, 2025

  • - guess_type() should return the class rather than the name of the class
  • - you can put a label param on the constructor (e.g. lines 41-42 can be just one line)
  • - born and died timespans should use the date parser to have the dates in botb and eote
  • - should probably deduplicate equivalent after adding from both sameAs and isIdedByAuthority
  • - It would be easier to keep up to date with a common set and then birth+death and founding+dissolution handled in a class specific function

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.

2 participants