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 Smaller Cataloging Vocabs #363

Open sfolsom opened 11 months ago

sfolsom commented 11 months ago

Create direct lookups for the following LOC smaller cataloging vocabs. See https://id.loc.gov/techcenter/searching.html for API documentation.

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

Related links: Create direct lookups for the following LOC smaller cataloging vocabs. 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=1379361528

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/vocabulary/maspect). Each result has an id, label, and uri parsed from: https://id.loc.gov/search/?q=cs:http://id.loc.gov/vocabulary/maspect&format=json

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

Example endpoints:

sfolsom commented 8 months ago

Reviewed all. They look good. I've sent questions/comments to LOC for the two with unexpected results.

sfolsom commented 7 months ago

We need to add these as well:

Baroquem commented 3 months ago

I should have updated this last week:

Baroquem commented 3 months ago

Just to note for the record, as per our discussion, that mpunctuationConventions is no longer available and not needed.

Baroquem commented 3 months ago

The change for identifiers, which is working on my local system, has been merged into the dev branch on qa_server_container. I don't understand why it's not appearing on https://lookup-int.ld4l.org.

sfolsom commented 3 months ago

@Baroquem I don't know if this has something to do with it, but should identifiers be added to https://github.com/LD4P/qa_server_container/blob/5948a19d2df6242b4c26b72c1c9aeae0c1e601a8/lib/qa/authorities/loc_subauthority.rb#L104? (given identifiers types have a base URL http://id.loc.gov/datatypes/identifiers).

sfolsom commented 3 months ago

Given you have this working on your local system I don't think this is the case, but... might this have something to do with identifiers needing to be in the https://github.com/LD4P/qa_server_container/blob/5948a19d2df6242b4c26b72c1c9aeae0c1e601a8/lib/qa/authorities/loc_subauthority.rb#L104 section, rather than https://github.com/LD4P/qa_server_container/blob/5948a19d2df6242b4c26b72c1c9aeae0c1e601a8/lib/qa/authorities/loc_subauthority.rb#L32?

identifiers have a base URL of http://id.loc.gov/datatypes/

Baroquem commented 3 months ago

That shouldn't make a difference -- even if the base URL were wrong, it should still register as one of the extensions in the vocabularies list, but it's not. I'm a bit confused, though, because in an earlier comment you said that the URL was http://id.loc.gov/vocabulary/identifiers.

sfolsom commented 3 months ago

@Baroquem Sorry for the confusion. I've spent some time today trying to confirm, but at this point it might be quicker to just add them both, now that I better understand what it takes.

Baroquem commented 3 months ago

@sfolsom - thanks to @gdelisle, identifiers are availlable now to test-- example: https://lookup-int.ld4l.org/authorities/search/loc/identifiers?q=art

sfolsom commented 3 months ago

Looks good!