Skip to content

Commit

Permalink
LOC ingestion
Browse files Browse the repository at this point in the history
  • Loading branch information
docuracy committed Jan 28, 2025
1 parent 2eae9ee commit 0ed6060
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions vespa/repository/api/ingestion/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,15 @@
) and any(
("madsrdf:hasCloseExternalAuthority" in graph_item or
("madsrdf:hasExactExternalAuthority" in graph_item and
# Exclude VIAF links which are typically invalid, and essentially the same as the LOC ID
not graph_item["madsrdf:hasExactExternalAuthority"].get("@id", "").startswith("http://viaf.org/")))
# Exclude VIAF links which are typically invalid, and essentially the same as the LOC ID
isinstance(graph_item, dict) and # Allow if there is a list of more than one external authorities
(
# Check if madsrdf:hasExactExternalAuthority is an object
isinstance(graph_item.get("madsrdf:hasExactExternalAuthority", {}), dict) and
not graph_item["madsrdf:hasExactExternalAuthority"].get("@id", "").startswith(
"http://viaf.org/")
)
))
for graph_item in record.get("@graph", [])
)
]
Expand Down

0 comments on commit 0ed6060

Please sign in to comment.