Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Local Lookup for RDA Terms #385

Open
48 tasks done
sfolsom opened this issue Sep 5, 2023 · 11 comments
Open
48 tasks done

Add Local Lookup for RDA Terms #385

sfolsom opened this issue Sep 5, 2023 · 11 comments
Assignees

Comments

@sfolsom
Copy link
Contributor

sfolsom commented Sep 5, 2023

Samvara QA code has a sample yml file to add a controlled list locally to a QA instance: https://github.com/samvera/questioning_authority/blob/main/config/authorities/states.yml

RDA Registry doesn't seem to have a search API that we can use to create a direct lookup, so we need to add a file for each of the RDA Reference value vocabularies found here: https://www.rdaregistry.info/termList/. The ids in the yml will need to be the URI for the term, and the term in the yml should be the preferred term in English.

I'm not sure if our instance is set up for these types of lookups, so we'll have to do some testing.

  • RDA Aspect Ratio Designation
  • RDA Bibliographic Format
  • RDA Broadcast Standard
  • RDA Carrier Extent Unit
  • RDA Carrier Type
  • RDA Cartographic Data Type
  • RDA Collection Accrual Method
  • RDA Collection Accrual Policy
  • RDA Colour Content
  • RDA Configuration of Playback Channels
  • RDA Content Type
  • RDA Extension Plan
  • RDA File Type
  • RDA Font Size
  • RDA Form of Musical Notation
  • RDA Form of Notated Movement
  • RDA Form of Tactile Notation
  • RDA Format of Notated Music
  • RDA Frequency
  • RDA Generation
  • RDA Groove Pitch of an Analog Cylinder
  • RDA Groove Width of an Analog Disc
  • RDA Illustrative Content
  • RDA Interactivity Mode
  • RDA Layout
  • RDA Linked Data Work
  • RDA Material
  • RDA Media Type
  • RDA Mode of Issuance
  • RDA Polarity
  • RDA Presentation Format
  • RDA Production Method
  • RDA Recording Medium
  • RDA Recording Methods
  • RDA Recording Source
  • RDA Reduction Ratio Designation
  • RDA Regional Encoding
  • RDA Scale Designation
  • RDA Sound Content
  • RDA Special Playback Characteristics
  • RDA Status of Identification
  • RDA Terms
  • RDA Track Configuration
  • RDA Type of Binding
  • RDA Type of Recording
  • RDA Unit of Time
  • RDA User Tasks
  • RDA Video Format
@sfolsom
Copy link
Contributor Author

sfolsom commented Sep 12, 2023

If I create a yml file for one as a proof of concept that we can test, perhaps we can script the translation of RDF descriptions of these terms to the yml file that QA needs.

@sfolsom
Copy link
Contributor Author

sfolsom commented Oct 30, 2023

Confirmed again that there's no API.

@chrisrlc chrisrlc self-assigned this Nov 1, 2023
@chrisrlc
Copy link

chrisrlc commented Nov 2, 2023

@sfolsom You mentioned: "The ids in the yml will need to be the URI for the term, and the term in the yml should be the preferred term in English.", but it looks like we can include separate id and uri fields for each term. For something like: http://www.rdaregistry.info/termList/AspectRatio, I can create a yml with the following:

:terms:
    - :id: "1001"
      :term: full screen
      :uri: http://rdaregistry.info/termList/AspectRatio/1001
    - :id: "1003"
      :term: mixed aspect ratio
      :uri: http://rdaregistry.info/termList/AspectRatio/1003
    - :id: "1002"
      :term: wide screen
      :uri: http://rdaregistry.info/termList/AspectRatio/1002

Would that work? Otherwise, using a uri for id seems to break individual term fetching as is (e.g. /authorities/show/local/rda_aspect_ratio_designation/1001 vs /authorities/show/local/rda_aspect_ratio_designation/http://rdaregistry.info/termList/AspectRatio/1001).

@chrisrlc
Copy link

chrisrlc commented Nov 2, 2023

Also, do we want to include all terms in the local lists, including deprecated terms? Example of vocab with deprecated and published terms: https://www.rdaregistry.info/termList/RDATerms/

@sfolsom
Copy link
Contributor Author

sfolsom commented Nov 2, 2023

Good questions! I think we shouldn't bother with a fetch test for these (which is really just a test that the API is up and running) since these are "hard coded" into the lookup service with the yml file and not connecting to an external service. If the id: value is the URI is the same as the cities pick list, I think that would be ok.

I think for now we can/should include the deprecated terms so that catalogers who are familiar with a term can see that it's deprecated, and should use something else.

@chrisrlc
Copy link

chrisrlc commented Nov 2, 2023

Sounds good - will change it so that id and uri are the same:

:terms:
    - :id: http://rdaregistry.info/termList/AspectRatio/1001
      :uri: http://rdaregistry.info/termList/AspectRatio/1001
      :term: full screen
    - :id: http://rdaregistry.info/termList/AspectRatio/1003
      :uri: http://rdaregistry.info/termList/AspectRatio/1003
      :term: mixed aspect ratio
    - :id: http://rdaregistry.info/termList/AspectRatio/1002
      :uri: http://rdaregistry.info/termList/AspectRatio/1002
      :term: wide screen

Fwiw, there seem to be 3 different endpoints for connecting to local controlled vocabulary:

  1. Search: https://lookup.ld4l.org/authorities/search/local/publisher_cities_select_list?q=London
    • Requires query (q) parameter. Only returns id, label and optional uri.
    • Also responds to page_limit and page_offset params
  2. All terms: https://lookup.ld4l.org/authorities/terms/local/publisher_cities_select_list
    • Returns all terms with id, label, optional uri, an "active" boolean field (defaults to true unless set to false in yml)
  3. Individual term fetch: no example on lookup.ld4l because all the existing local controlled vocabulary ymls use uri as ids, but the endpoint would look something like: http://localhost:3001/authorities/show/local/rda_aspect_ratio_designation/1001
    • Returns all fields for a given term, including any arbitrary fields set in the yml file and an "active" boolean field (defaults to true unless set to false in yml)

So a benefit of the individual term fetching endpoint for local controlled vocabulary is that we could theoretically add additional information for each term that wouldn't show up in search.

We could also set that "active" boolean field to false for deprecated terms - terms with active: false still show up in search.

No changes suggested, just some context I found when digging around that I thought could be useful!

@chrisrlc
Copy link

chrisrlc commented Nov 6, 2023

Ready for testing on lookup-int!

There should be 48 new local lookup endpoints, each local subauth in the endpoint urls is the name of the vocab but in lowercase snakecase.

For example. the endpoints for RDA Video format is:

  1. Search: https://lookup-int.ld4l.org/authorities/search/local/rda_video_format?q=beta
  2. All terms: https://lookup-int.ld4l.org/authorities/terms/local/rda_video_format
  3. Individual term fetch: not working because id is a uri.

RDA Aspect Ratio Designation:

  1. Search: https://lookup-int.ld4l.org/authorities/search/local/rda_aspect_ratio_designation?q=screen
  2. All terms: https://lookup-int.ld4l.org/authorities/terms/local/rda_aspect_ratio_designation
  3. Individual term fetch: not working because id is a uri.

Etc. Please let me know if you'd like any changes/if you notice anything strange!

@sfolsom
Copy link
Contributor Author

sfolsom commented Nov 8, 2023

I've started taking a look at these, and the search results look good. (I'm still going to go through each of the 48, but one thing I've noticed so far is that there's no "uri": in the json. I think this is what Sinopia is looking for.)

@chrisrlc
Copy link

chrisrlc commented Nov 8, 2023

I noticed the missing uri also wasn't showing up for https://lookup.ld4l.org/authorities/search/local/publisher_cities_select_list?q=London either, so wasn't sure if that was just expected behavior. Oddly, uri and id are showing up in the json in my local environment though – I'll poke around to try to figure out what the difference is.

@sfolsom
Copy link
Contributor Author

sfolsom commented Nov 8, 2023

I just looked at the cities lookup in Sinopia, and it's not adding the URI to records when I try to link to them. Want me make a separate issue to add "uri": to that lookup?

@chrisrlc
Copy link

The upgraded qa gem has been deployed to lookup-int, and I've confirmed that the uri fields are now displaying in the json response, e.g. https://lookup-int.ld4l.org/authorities/search/local/rda_aspect_ratio_designation?q=screen. But if Sinopia is still sad about the updated response, please let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

No branches or pull requests

2 participants