CLARIAH / vocab-workers

0 stars 0 forks source link

Detect if Bartoc knows a vocabulary #3

Closed lilimelgar closed 2 months ago

lilimelgar commented 5 months ago

The vocabularies from the vocabulary registry may also be indexed by other vocabulary registries. It would be useful if we could present a link to those registries per vocabulary. For that, we need to:

  1. Identify which vocabulary registries we would like to map to
  2. For each vocabulary, detect if they have an API
  3. Write a worker script that fetches the data from the API, gets the vocabulary Id and compares it to our Id
  4. If the Id is the same, fetch the URI to the target vocabulary
  5. Store the URI in???
kerim1 commented 2 months ago

For BARTOC:

  1. Use the Suggest API: https://bartoc.org/api/voc/suggest?search=<> Use the cmdi:identifier or the cmdi:title to find suggestions.
  2. Go through the list of BARTOC URI's and for each URI:
  3. Use the Voc API: https://bartoc.org/api/voc?uri=<uri>
  4. And see if the namespace url matches
  5. Print to screen for now what has to be recorded in the record
    <cmd:Assessement>
                <cmd:Recommendation>
                    <cmd:Rating>appears</cmd:Rating>
                    <cmd:Publisher>
                        <cmd:uri>https://triplydb.com/none/gold</cmd:uri>
                        <cmd:publisherUri>https://triplydb.com</cmd:publisherUri>
                        <cmd:name>YALC</cmd:name>
                    </cmd:Publisher>
                </cmd:Recommendation>
                <cmd:Recommendation>
                    <cmd:Rating>appears</cmd:Rating>
                    <cmd:Publisher>
                        <cmd:uri>http://bartoc.org/en/node/17985</cmd:uri>
                        <cmd:publisherUri>http://bartoc.org</cmd:publisherUri>
                        <cmd:name>BARTOC</cmd:name>
                    </cmd:Publisher>
                </cmd:Recommendation>
            </cmd:Assessement>
lilimelgar commented 2 months ago

@kerim1, I worked on this issue only for Bartoc, the first draft of the script is ready for you to please review it. It's on a separate branch: https://github.com/CLARIAH/vocab-workers/tree/3-detect-which-catalogs-know-a-vocabulary. Note that it uses for now the manually refactored testing files (with the namespace outside the summary). I will send the files separately.