Last active
August 19, 2019 13:13
-
-
Save felixlohmeier/065727cffeafb216c24f730c40f3b1f6 to your computer and use it in GitHub Desktop.
Automate GND reconciliation for OpenRefine
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 1 column, instead of 2. in line 2.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name;beruf;ort | |
J. Weizenbaum;Informatiker;Berlin | |
Twain, Mark;Schriftsteller; | |
Kumar, Lalit;; | |
Jemand;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"op": "core/recon", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "name", | |
"config": { | |
"mode": "standard-service", | |
"service": "https://lobid.org/gnd/reconcile", | |
"identifierSpace": "https://lobid.org/gnd", | |
"schemaSpace": "https://lobid.org/gnd", | |
"type": { | |
"id": "Person", | |
"name": "Person" | |
}, | |
"autoMatch": true, | |
"columnDetails": [ | |
{ | |
"column": "beruf", | |
"propertyName": "Beruf oder Beschäftigung (Literal)", | |
"propertyID": "professionOrOccupationAsLiteral" | |
} | |
], | |
"limit": 0 | |
}, | |
"description": "Reconcile cells in column name to type Person" | |
}, | |
{ | |
"op": "core/extend-reconciled-data", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"baseColumnName": "name", | |
"endpoint": "https://lobid.org/gnd/reconcile", | |
"identifierSpace": "https://lobid.org/gnd", | |
"schemaSpace": "https://lobid.org/gnd", | |
"extension": { | |
"properties": [ | |
{ | |
"id": "professionOrOccupation", | |
"name": "Beruf oder Beschäftigung" | |
}, | |
{ | |
"id": "placeOfBirth", | |
"name": "Geburtsort" | |
}, | |
{ | |
"id": "placeOfDeath", | |
"name": "Sterbeort" | |
}, | |
{ | |
"id": "geographicAreaCode", | |
"name": "Ländercode" | |
} | |
] | |
}, | |
"columnInsertIndex": 1, | |
"description": "Extend data at index 1 based on column name" | |
}, | |
{ | |
"op": "core/row-removal", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"type": "list", | |
"name": "name: judgment", | |
"expression": "forNonBlank(cell.recon.judgment, v, v, if(isNonBlank(value), \"(unreconciled)\", \"(blank)\"))", | |
"columnName": "name", | |
"invert": false, | |
"omitBlank": false, | |
"omitError": false, | |
"selection": [ | |
{ | |
"v": { | |
"v": "none", | |
"l": "none" | |
} | |
} | |
], | |
"selectBlank": false, | |
"selectError": false | |
} | |
], | |
"mode": "row-based" | |
}, | |
"description": "Remove rows" | |
}, | |
{ | |
"op": "core/column-removal", | |
"columnName": "beruf", | |
"description": "Remove column beruf" | |
}, | |
{ | |
"op": "core/column-removal", | |
"columnName": "ort", | |
"description": "Remove column ort" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment