Skip to content

Instantly share code, notes, and snippets.

@karkraeg
Created December 19, 2022 21:16
Show Gist options
  • Select an option

  • Save karkraeg/9f0b2aa12ecea29a10c854afb845ec79 to your computer and use it in GitHub Desktop.

Select an option

Save karkraeg/9f0b2aa12ecea29a10c854afb845ec79 to your computer and use it in GitHub Desktop.
Get german Names of Instruments from MIMO Vocabulary
import json
import requests
keywords = "https://raw.githubusercontent.com/philharmoniedeparis/mimo/master/our_data/03_skos/keywords_skos.json"
data = json.loads(requests.get(keywords).text)
instruments = []
for i in data[1:]:
for item in i["http://www.w3.org/2004/02/skos/core#prefLabel"]:
if item["@language"] == "de":
instruments.append(item["@value"])
instruments = list(set(instruments))
print(sorted(instruments))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment