Skip to content

Commit

Permalink
Change properties and adjust regexp for predecessor/succesor #457
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Aug 10, 2023
1 parent d30c842 commit 7dacdbb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions conf/context.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@
"GeoCoordinates": "https://schema.org/GeoCoordinates",
"ServiceChannel": "https://schema.org/ServiceChannel",
"picaPPN": "http://purl.org/lobid/lv#picaPPN",
"replacedBy": "https://schema.org/replacedBy",
"replaces" : "https://schema.org/replaces",
"successor": "https://d-nb.info/standards/elementset/gnd#successor",
"predecessor" : "https://d-nb.info/standards/elementset/gnd#predecessor",
"gndIdentifier" : "https://d-nb.info/standards/elementset/gnd#gndIdentifier",
"note" : {
"@id" : "http://id.loc.gov/ontologies/bibframe/note",
Expand Down
20 changes: 10 additions & 10 deletions conf/fix-enriched.fix
Original file line number Diff line number Diff line change
Expand Up @@ -464,16 +464,16 @@ do list(path: "047A","var":"$i")
end
end

set_array("replaces[]")
set_array("predecessor[]")
do list(path: "035D","var":"$i")
do list(path:"$i.b","var":"$j")
if any_match("$j","^(..|ZDB)-.*")
copy_field("$j","replaces[].$append.isil")
copy_field("$j","predecessor[].$append.isil")
end
end
end

do list(path:"replaces[]","var":"$i")
do list(path:"predecessor[]","var":"$i")
copy_field("$i.isil","$i.id")
replace_all("$i.id","^(.*)$","http://lobid.org/organisations/$1#!")
if any_contain("$i.id", "ZDB")
Expand All @@ -484,15 +484,15 @@ do list(path:"replaces[]","var":"$i")
end
end

set_array("replacedBy[]")
set_array("successor[]")
do list(path:"note[]", "var":"$i")
if any_match("$i","Ung.ltig;.*aufgegangen in.*((DE|ZDB)-.*?)(;.*|$)")
copy_field("$i","replacedBy[].$append.isil")
replace_all("replacedBy[].$last.isil","Ung.ltig;.*aufgegangen in.*((DE|ZDB)-.*?)(;.*|$)","$1")
if any_match("$i","Ung.ltig;.*aufgegangen in.*([A-Z]{1,4}-.*?)(;.*|$)") # REGEX should catch the ISIL
copy_field("$i","successor[].$append.isil")
replace_all("successor[].$last.isil","Ung.ltig;.*aufgegangen in.*([A-Z]{1,4}-.*?)(;.*|$)","$1") # REGEX should catch the ISIL
end
end

do list(path:"replacedBy[]","var":"$i")
do list(path:"successor[]","var":"$i")
copy_field("$i.isil","$i.id")
replace_all("$i.id","^(.*)$","http://lobid.org/organisations/$1#!")
if any_contain("$i.id", "ZDB")
Expand Down Expand Up @@ -581,8 +581,8 @@ retain(
"picaPPN",
"provides",
"rs",
"replaces[]",
"replacedBy[]",
"predecessor[]",
"successor[]",
"sameAs[]",
"sigel",
"telephone",
Expand Down

0 comments on commit 7dacdbb

Please sign in to comment.