Created
December 19, 2022 21:16
-
-
Save karkraeg/9f0b2aa12ecea29a10c854afb845ec79 to your computer and use it in GitHub Desktop.
Get german Names of Instruments from MIMO Vocabulary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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