Skip to content

Commit

Permalink
Fix label lookup for RPPD-URIs with GND identifier (RPB-154)
Browse files Browse the repository at this point in the history
For persons both in RPPD and GND, selected from RPPD in Strapi e.g.
http://rppd.lobid.org/118589598 in http://rppd.lobid.org/121384462

Also update and clean up person lookup maps for current usage
  • Loading branch information
fsteeg committed Apr 15, 2024
1 parent c5348c1 commit 61f1be6
Show file tree
Hide file tree
Showing 9 changed files with 16,112 additions and 13,558 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ if any_contain("gndIdentifier", "Keine")
reject()
end

copy_field("gndIdentifier", "uri")
prepend("uri", "https://d-nb.info/gnd/")
replace_all("preferredName", "\\/\\s(ca\\.|um)?-?\\s?\\d.+$", "")
trim("preferredName")

retain("rppdId", "preferredName", "uri")
retain("gndIdentifier", "preferredName")
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FLUX_DIR + "output/rppd-export.jsonl"
| open-file
| as-lines
| decode-json(recordPath="data")
| fix(FLUX_DIR + "rppd-rppdId-with-label-map.fix")
| fix(FLUX_DIR + "map-gnd-person-to-label.fix")
| encode-csv(includeheader="true", noquotes="true",separator="\t")
| write(FLUX_DIR + "maps/rppdId-with-label.tsv")
;
| write(FLUX_DIR + "maps/gndId-to-label.tsv")
;
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ unless any_contain("gndIdentifier", "Keine")
reject()
end

copy_field("rppdId", "uri")
prepend("uri", "https://rppd.lobid.org/")
replace_all("preferredName", "\\/\\s(ca\\.|um)?-?\\s?\\d.+$", "")
trim("preferredName")

retain("rppdId", "preferredName", "uri")
retain("rppdId", "preferredName")
6 changes: 3 additions & 3 deletions conf/rppd-to-gnd-mapping.flux → conf/map-rppd-to-label.flux
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FLUX_DIR + "output/rppd-export.jsonl"
| open-file
| as-lines
| decode-json(recordPath="data")
| fix(FLUX_DIR + "rppd-to-gnd-map.fix")
| fix(FLUX_DIR + "map-rppd-to-label.fix")
| encode-csv(includeheader="true", noquotes="true",separator="\t")
| write(FLUX_DIR + "maps/gndId-to-rppdId.tsv")
;
| write(FLUX_DIR + "maps/rppdId-to-label.tsv")
;
Loading

0 comments on commit 61f1be6

Please sign in to comment.