Skip to content

Commit

Permalink
Merge #499 from remote-tracking branch 'origin/383-fixWikidataLookup'
Browse files Browse the repository at this point in the history
  • Loading branch information
dr0i committed Sep 26, 2023
2 parents 9bbb4c6 + 852ec00 commit 1f3ab0a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion app/transformation/TransformAll.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static JsonToElasticsearchBulk esBulk() {
static Metafix fixEnriched(final String geoLookupServer, final String wikidataLookupFilename) throws FileNotFoundException {
final HashMap<String, String> fixVariables = new HashMap<>();
fixVariables.put("isil2wikidata", wikidataLookupFilename);
fixVariables.put("dbsId2wikidata", wikidataLookupFilename);
fixVariables.put("dbsID2wikidata", wikidataLookupFilename);
fixVariables.put("wikidata2gndIdentifier", wikidataLookupFilename);
Metafix fixEnriched = new Metafix("conf/fix-enriched.fix", fixVariables);

Expand Down
6 changes: 3 additions & 3 deletions conf/fix-enriched.fix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
do once("mapsAndMacros")
put_filemap("$[isil2wikidata]","isil2wikidata", sep_char:"\t",key_column:"2",value_column:"0",expected_columns:"-1")
put_filemap("$[dbsId2wikidata]","dbsId2wikidata", sep_char:"\t",key_column:"4",value_column:"0",expected_columns:"-1")
put_filemap("$[dbsID2wikidata]","dbsID2wikidata", sep_char:"\t",key_column:"4",value_column:"0",expected_columns:"-1")
put_filemap("$[wikidata2gndIdentifier]","wikidata2gndIdentifier", sep_char:"\t",key_column:"0",value_column:"3",expected_columns:"-1")
put_filemap("conf/libtype-map.csv","libtype_map", sep_char:"\t")
put_filemap("conf/plz-ags-map.csv","ags_map", sep_char:"\t")
Expand Down Expand Up @@ -372,8 +372,8 @@ end
copy_field("isil","@wikidataMap")
lookup ("@wikidataMap","isil2wikidata",delete:"true")
unless exists("@wikidataMap")
copy_field("dbsId","@wikidataMap")
lookup ("@wikidataMap","dbsId2wikidata",delete:"true")
copy_field("dbsID","@wikidataMap")
lookup ("@wikidataMap","dbsID2wikidata",delete:"true")
end

set_array("alternateName[]")
Expand Down
2 changes: 1 addition & 1 deletion test/transformation/TestTransformAll.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void process(String obj) {
final HashMap<String, String> fixVariables = new HashMap<>();
final String wikidataLookupFile ="../test/conf/wikidataLookup.tsv";
fixVariables.put("isil2wikidata", wikidataLookupFile);
fixVariables.put("dbsId2wikidata", wikidataLookupFile);
fixVariables.put("dbsID2wikidata", wikidataLookupFile);
fixVariables.put("wikidata2gndIdentifier", wikidataLookupFile);
Metafix fixEnriched = new Metafix("conf/fix-enriched.fix", fixVariables);
sourceFileOpener.setReceiver(new LineReader())//
Expand Down
Loading

0 comments on commit 1f3ab0a

Please sign in to comment.