Skip to content

Commit

Permalink
Add relatedPerson (RPB-102)
Browse files Browse the repository at this point in the history
  • Loading branch information
maipet committed Nov 2, 2023
1 parent 8b5b2db commit 07696e3
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 4 deletions.
4 changes: 4 additions & 0 deletions conf/output/test-output-rppd-lobid-0.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
"label" : "Neustrelitz",
"id" : "https://rpb.lobid.org/dummi/Neustrelitz"
} ],
"relatedPerson" : [ {
"label" : "Wagner, Richard",
"id" : "https://rpb.lobid.org/dummi/Wagner, Richard"
} ],
"gender" : [ {
"id" : "https://d-nb.info/standards/vocab/gnd/gender#male",
"label" : "Männlich"
Expand Down
7 changes: 7 additions & 0 deletions conf/output/test-output-rppd-lobid-12.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
"label" : "New York, NY",
"id" : "https://rpb.lobid.org/dummi/New York, NY"
} ],
"relatedPerson" : [ {
"label" : "Anschuez, Joseph Andreas",
"id" : "https://d-nb.info/gnd/118649558"
}, {
"label" : "Anschütz, Hermann",
"id" : "https://d-nb.info/gnd/116312351"
} ],
"gender" : [ {
"id" : "https://d-nb.info/standards/vocab/gnd/gender#male",
"label" : "Männlich"
Expand Down
13 changes: 13 additions & 0 deletions conf/output/test-output-rppd-lobid-13.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@
"label" : "Koblenz, Kreisfreie Stadt",
"id" : "https://rpb.lobid.org/spatial#n11100000"
} ],
"relatedPerson" : [ {
"label" : "Anschuez, Carl",
"id" : "https://d-nb.info/gnd/1051147395"
}, {
"label" : "Anschuez, Franz Caspar",
"id" : "https://d-nb.info/gnd/1051177324"
}, {
"label" : "Anschuez, Heinrich Franz",
"id" : "https://d-nb.info/gnd/1051177332"
}, {
"label" : "Anschütz, Hermann",
"id" : "https://d-nb.info/gnd/116312351"
} ],
"gender" : [ {
"id" : "https://d-nb.info/standards/vocab/gnd/gender#male",
"label" : "Männlich"
Expand Down
7 changes: 7 additions & 0 deletions conf/output/test-output-rppd-lobid-16.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
"label" : "Köln",
"id" : "https://rpb.lobid.org/dummi/Köln"
} ],
"relatedPerson" : [ {
"label" : "Meister, Ernst",
"id" : "https://d-nb.info/gnd/1051179556"
}, {
"label" : "Meister, Nikolaus",
"id" : "https://d-nb.info/gnd/1051179564"
} ],
"gender" : [ {
"id" : "https://d-nb.info/standards/vocab/gnd/gender#male",
"label" : "Männlich"
Expand Down
4 changes: 4 additions & 0 deletions conf/output/test-output-rppd-lobid-22.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
"label" : "Konzentrationslager Dachau",
"id" : "https://rpb.lobid.org/dummi/Konzentrationslager Dachau"
} ],
"relatedPerson" : [ {
"label" : "Ziegler, Hans",
"id" : "https://d-nb.info/gnd/1051203023"
} ],
"gender" : [ {
"id" : "https://d-nb.info/standards/vocab/gnd/gender#male",
"label" : "Männlich"
Expand Down
7 changes: 7 additions & 0 deletions conf/output/test-output-rppd-lobid-26.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
"label" : "Konzentrationslager Dachau",
"id" : "https://rpb.lobid.org/dummi/Konzentrationslager Dachau"
} ],
"relatedPerson" : [ {
"label" : "Schulz, Johannes",
"id" : "https://d-nb.info/gnd/119273861"
}, {
"label" : "Bettendorff, Ludwig",
"id" : "https://d-nb.info/gnd/1051206464"
} ],
"gender" : [ {
"id" : "https://d-nb.info/standards/vocab/gnd/gender#male",
"label" : "Männlich"
Expand Down
4 changes: 4 additions & 0 deletions conf/output/test-output-rppd-lobid-5.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
"label" : "Werdohl",
"id" : "https://rpb.lobid.org/dummi/Werdohl"
} ],
"relatedPerson" : [ {
"label" : "Heyberger, Renate",
"id" : "https://rpb.lobid.org/dummi/Heyberger, Renate"
} ],
"gender" : [ {
"id" : "https://d-nb.info/standards/vocab/gnd/gender#male",
"label" : "Männlich"
Expand Down
4 changes: 4 additions & 0 deletions conf/output/test-output-rppd-lobid-9.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"label" : "Unkel, Stadt",
"id" : "https://rpb.lobid.org/spatial#n13807073"
} ],
"relatedPerson" : [ {
"label" : "Reinirkens, Ernst Leonhard",
"id" : "https://d-nb.info/gnd/139865985"
} ],
"gender" : [ {
"id" : "https://d-nb.info/standards/vocab/gnd/gender#male",
"label" : "Männlich"
Expand Down
29 changes: 25 additions & 4 deletions conf/rppd-to-lobid.fix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ end
do once("map_spatial")
put_rdfmap("https://raw.githubusercontent.com/hbz/lobid-vocabs/master/rpb/rpb-spatial.ttl", "spatial_map", target:"skos:prefLabel", select_language:"de")
end
# für lookup relatedPerson
do once("map_rel")
put_filemap("conf/maps/gndId-to-rppdId.tsv", "map_rel_gndId",key_column:"0",value_column:"1", sep_char: "\t", expected_columns:"-1")
put_filemap("conf/maps/gndId-to-rppdId.tsv", "map_rel_preferredName",key_column:"0",value_column:"2", sep_char: "\t", expected_columns:"-1")
end


# ------
Expand Down Expand Up @@ -181,9 +186,24 @@ end
# Kommentar Doku: RPPD-ID-Nr. mit Unterstrichen, falls Person bereits in RPPD aufgenommen (Bsp.: _pk0000_), sonst Klartext: Nachname, Vorname / Lebensdaten; getrennt mit @; nähere Ausführungen in 1nz notwendig; verknüpfte Person ist anklickbar
# TODO: Wenn rppd ID angegeben wird, unterstriche löschen und zu URL transformieren (wie id) und auf Feld relatedPerson[].*.id mappen.

# -------
# #1nt (persönl. Beziehungen (m, R)) -> relatedPerson (unspezifisch)
# Kommentar Doku: RPPD-ID-Nr. mit Unterstrichen, falls Person bereits in RPPD aufgenommen (Bsp.: _pk0000_), sonst Klartext: Nachname, Vorname / Lebensdaten; getrennt mit @; nähere Ausführungen in 1nz notwendig; verknüpfte Person ist anklickbar

set_array("relatedPerson[]")
do list(path:"f1nt[]", "var": "$i")
if any_match("$i.f1nt", "^_.+")
replace_all("$i.f1nt", "_", "")
copy_field("$i.f1nt", "relatedPerson[].$append.label")
copy_field("$i.f1nt", "relatedPerson[].$last.id")
lookup("relatedPerson[].$last.label", "map_rel_preferredName")
lookup("relatedPerson[].$last.id", "map_rel_gndId")
prepend("relatedPerson[].$last.id","https://d-nb.info/gnd/")
else
copy_field("$i.f1nt", "relatedPerson[].$append.label")
prepend("$i.f1nt", "https://rpb.lobid.org/dummi/")
copy_field("$i.f1nt", "relatedPerson[].$last.id")
end
end



# -------
# #1nu (Werke (m)) -> publication
Expand Down Expand Up @@ -261,6 +281,7 @@ retain(
"placeOfActivity[]",
"gndSubjectCategory[]",
"placeOfBirth[]",
"placeOfDeath[]"
"placeOfDeath[]",
"relatedPerson[]"
)

0 comments on commit 07696e3

Please sign in to comment.