daima2017 / NCA-OSM-to-KGs

This repository provides the code for implementing the class alignments between OpenStreetMap and Knowledge Graphs using an auxiliary neural classification model based on linked entities between OSM and KG

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Towards Neural Schema Alignment forOpenStreetMap and Knowledge Graphs

This repository contains the manually generated ground truth and implementation codes for the paper Towards Neural Schema Alignment forOpenStreetMap and Knowledge Graphs.

Descriptions:

Steps to obtain tag-to-class matches:

  1. Download specific OSM data from https://download.geofabrik.de/
  2. Run osm_2_rdf.py to get the data in RDF format for further processing. 1st argument is the downloaded geofabrik file and 2nd argument is the file name in which you want to save the rdf triples. example command: python osm_2_rdf.py italy-latest.osm.pbf italyRDFWikidata.txt
  3. Run script readRDFWikidata.py or readRDFDBpedia.py to get the one-hot encoded OSM and KG data. 1st argument is triples file generated from previous script 2nd argument is the new .csv file in which the OSM and KG data will be stored. example command: python readRDFWikidata.py italyRDFWikidata.txt italyWikidata.csv
  4. Run script schemaMatch.py to get the list which matches generated by the model. 1st argument is .csv file generated from previous script. 2nd argument is the new .csv file which will store the matches and 3rd argument is the activation threshold value. example command: python schemaMatch.py italyWikidata.csv italyWikidataMatches.csv 0.35

Folder Descriptions:

Data: contains data files in compressed format.

GroudnTruth: Contains manually annotated ground truth from 6 countries for Wikidata and DBpedia classes

Scripts: Contains scripts to run NCA approach and also scripts for baselines.

About

This repository provides the code for implementing the class alignments between OpenStreetMap and Knowledge Graphs using an auxiliary neural classification model based on linked entities between OSM and KG

License:MIT License


Languages

Language:Python 100.0%