cul-it / qa_server

A rails app with questioning authority gem installed to serve as a QA server.
Apache License 2.0
1 stars 6 forks source link

Add Direct Lookups for LC Subjects #369

Closed sfolsom closed 3 months ago

sfolsom commented 11 months ago

Create direct lookups for the following LC Subjects.

The Samvera QA Code seems to offer search for LC Subjects: https://github.com/samvera/questioning_authority/wiki/Connecting-to-Library-of-Congress-%28LOC%29.

Related links: See https://id.loc.gov/techcenter/searching.html for API documentation.

Example of a direct search config to base new config off: https://github.com/cul-it/qa_server/blob/f3083a8f1392e72890f8d6e6a763c9e0ace1ea0c/config/authorities/linked_data/oclcfast_direct.json#L32

Data to bring in and translate, if available in the API: https://docs.google.com/spreadsheets/d/1rPvEoP9iYNkxJ0eWC8gXe3ci7e6mhW0da59xkGhadi0/edit#gid=221282005

chrisrlc commented 8 months ago

@sfolsom This is ready for you to test on lookup-int! Direct lookup results use the id.loc.gov api (same results as what you'd find here: https://id.loc.gov/search/?q=cs:http://id.loc.gov/authorities/subjects). Each result has an id, label, and uri parsed from: https://id.loc.gov/search/?q=cs:http://id.loc.gov/authorities/subjects&format=json

Please let me know if you'd like any changes!

Example endpoint: https://lookup-int.ld4l.org/authorities/search/loc/subjects?q=school%20sports

sfolsom commented 8 months ago

These look good. LOC has done a decent enough job being forgiving with parentheticals, etc.

sfolsom commented 3 months ago

Need sub-authorities for each of the following collections (from https://id.loc.gov/authorities/subjects.html), so that they can be each searched separately

The suggest2 API has a parameter, e.g. https://id.loc.gov/authorities/subjects/suggest2?q=History&memberOf=http://id.loc.gov/authorities/subjects/collection_LCSHAuthorizedHeadings, but I'm not sure if this was the api that was used for LC lookups.

Baroquem commented 3 months ago

@sfolsom I don't see ComplexHeadings listed here: https://id.loc.gov/authorities/subjects.html. Am I looking at the wrong sources?

Baroquem commented 3 months ago

I think I have a working solution for the other collections now.

sfolsom commented 3 months ago

I was trying to confirm whether it's important to have ComplexHeadings as a separate lookup. You're right, they aren't a Collection, but rather treated as a type. I think it's fine to not have them served separately, given they show up in the Authorized collection.

Baroquem commented 3 months ago

OK, we're in business now!

Authorized Headings: http://lookup-int.ld4l.org/authorities/search/loc/collection_LCSHAuthorizedHeadings?q=School Subdivisions: http://lookup-int.ld4l.org/authorities/search/loc/collection_Subdivisions?q=study Topic: http://lookup-int.ld4l.org/authorities/search/loc/collection_TopicSubdivisions?q=quotations GenreForm: http://lookup-int.ld4l.org/authorities/search/loc/collection_GenreFormSubdivisions?q=quotations Temporal: http://lookup-int.ld4l.org/authorities/search/loc/collection_TemporalSubdivisions?q=794 Geographic: http://lookup-int.ld4l.org/authorities/search/loc/collection_GeographicSubdivisions?q=Mexico

sfolsom commented 3 months ago

Looks great!