From 72df06c3003b5070e8332752c4f862e5a4f0af6e Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Mon, 18 Dec 2023 14:07:32 +0100 Subject: [PATCH 1/3] Refer to DHNB paper in readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 336f4d3..cce0adc 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ This code is written primarily to fulfill the needs of the [Queerlit](https://queerlit.dh.gu.se/) project, but with the possibility in mind to adapt to other similar projects. +The thesaurus creation and this code repository are described in: + +> Matsson, A. and Kriström, O. (2023) “Building and Serving the Queerlit Thesaurus as Linked Open Data”, _Digital Humanities in the Nordic and Baltic Countries Publications_. Oslo, Norway, 5(1), pp. 29–39. doi: 10.5617/dhnbpub.10648. + ## Use case - Goal: An RDF/[SKOS](https://www.w3.org/2004/02/skos/) ontology shall be made available online From e2953fc799e9ee0bb6368ffbf44d52ac3dca45fa Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Mon, 18 Dec 2023 16:48:33 +0100 Subject: [PATCH 2/3] Delete old scripts --- fix.py | 53 ----------------------------------------------------- validate.sh | 10 ---------- 2 files changed, 63 deletions(-) delete mode 100644 fix.py delete mode 100755 validate.sh diff --git a/fix.py b/fix.py deleted file mode 100644 index ec7a6b2..0000000 --- a/fix.py +++ /dev/null @@ -1,53 +0,0 @@ -import os -import re -from unicodedata import normalize - -PATH_CURRENT = '/Users/arildm/University of Gothenburg/Olov Kriström - TTLs/' -PATH_REMOVED = '/Users/arildm/University of Gothenburg/Olov Kriström - Strukna/' - - -def fn_to_term(fn): - m = re.match(r'^\(?- ([^)]*)\)?.ttl$', fn) - return normalize('NFC', m.group(1)) if m else None - - -terms = [fn_to_term(fn) for fn in os.listdir(PATH_CURRENT) if fn_to_term(fn)] -terms_removed = [fn_to_term(fn) - for fn in os.listdir(PATH_REMOVED) if fn_to_term(fn)] - - -def remove_broken_links(fn, quiet=False): - new_content = '' - with open(os.path.join(PATH_CURRENT, fn)) as f: - for line in f.readlines(): - m = re.search(r']+/qlit/([^>]+)>', line) - if m: - term = m.group(1) - # Remove a line containing a discarded term - if term in terms_removed: - print('Ghost link', fn) - print(line) - continue - # Warn about other things - if not quiet: - if term not in terms: - if term.lower() in [term.lower() for term in terms]: - print('Warning: Wrong case', fn) - print(line) - else: - print('Warning: Missing link', fn) - print(line) - new_content += line - return new_content - - -def remove_broken_links_all(quiet=False, inplace=False): - for fn in os.listdir(PATH_CURRENT): - if fn.endswith('.ttl'): - os.makedirs('out', exist_ok=True) - with open('out/' + fn, 'w') as f: - f.write(remove_broken_links(fn, quiet)) - - -if __name__ == '__main__': - remove_broken_links_all() diff --git a/validate.sh b/validate.sh deleted file mode 100755 index 92078a7..0000000 --- a/validate.sh +++ /dev/null @@ -1,10 +0,0 @@ -# Arild 2022-02-17 -for file in ~/University\ of\ Gothenburg/Olov\ Kriström\ -\ TTLs/* -do - out=$(ttl "$file") - if [ $? -ne 0 ] - then - echo $file - echo $out - fi -done From 15d9a2d22e7f7c58aa754254b7a7039472974fb4 Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Wed, 20 Dec 2023 09:44:46 +0100 Subject: [PATCH 3/3] Data update --- qlit.nt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/qlit.nt b/qlit.nt index 99bba7a..829da92 100644 --- a/qlit.nt +++ b/qlit.nt @@ -4981,11 +4981,10 @@ . "jv45ng56" . "2022-05-19T10:12:00"^^ . - "2023-12-06T09:24:17"^^ . + "2023-12-20T08:43:57"^^ . . . . - . . . . @@ -12144,13 +12143,12 @@ . "Används för skildringar av barn till personer som beskrivs som bisexuella." . "xk72tb87" . - "2023-12-06T09:24:17"^^ . - "2023-12-06T09:24:17"^^ . + "2022-05-19T10:12:00"^^ . + "2023-12-20T08:43:57"^^ . . . . . - . "Adopterade (hbtqi)" . . .