Create multiple mapping files.

This commit is contained in:
Daniel Hernandez 2026-02-22 17:25:48 +01:00
parent a7d3ad3f62
commit c9c768aa17
21 changed files with 490 additions and 705 deletions

View file

@ -3,5 +3,6 @@ source 'https://rubygems.org'
gem 'sequel' gem 'sequel'
gem 'mysql2' gem 'mysql2'
gem 'sparql' gem 'sparql'
gem 'rdf-turtle'
gem 'nokogiri' gem 'nokogiri'
gem 'pry' gem 'pry'

View file

@ -36,6 +36,9 @@ GEM
link_header (~> 0.0, >= 0.0.8) link_header (~> 0.0, >= 0.0.8)
rdf-aggregate-repo (3.3.0) rdf-aggregate-repo (3.3.0)
rdf (~> 3.3) rdf (~> 3.3)
rdf-turtle (3.3.0)
ebnf (~> 2.4)
rdf (~> 3.3)
rdf-xsd (3.3.0) rdf-xsd (3.3.0)
rdf (~> 3.3) rdf (~> 3.3)
rexml (~> 3.2) rexml (~> 3.2)
@ -72,6 +75,7 @@ DEPENDENCIES
mysql2 mysql2
nokogiri nokogiri
pry pry
rdf-turtle
sequel sequel
sparql sparql
@ -96,6 +100,7 @@ CHECKSUMS
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
rdf (3.3.1) sha256=dda6a2c95198915fc63d66ee270e35d4a76d431720747a2cf97ecd92062fa150 rdf (3.3.1) sha256=dda6a2c95198915fc63d66ee270e35d4a76d431720747a2cf97ecd92062fa150
rdf-aggregate-repo (3.3.0) sha256=5693ccabf4dbbec7113c95e9aab028311f19d6022764fdebc6327f9d55a9efdc rdf-aggregate-repo (3.3.0) sha256=5693ccabf4dbbec7113c95e9aab028311f19d6022764fdebc6327f9d55a9efdc
rdf-turtle (3.3.0) sha256=10320428670be3510364195e68e365b888c458c4a462cfc8c28cdffccc64f699
rdf-xsd (3.3.0) sha256=fab51d27b20344237d9b622ef32e83e4c44940840bfc76a245ce6b6abba44772 rdf-xsd (3.3.0) sha256=fab51d27b20344237d9b622ef32e83e4c44940840bfc76a245ce6b6abba44772
readline (0.0.4) sha256=6138eef17be2b98298b672c3ea63bf9cb5158d401324f26e1e84f235879c1d6a readline (0.0.4) sha256=6138eef17be2b98298b672c3ea63bf9cb5158d401324f26e1e84f235879c1d6a
reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835 reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835

View file

@ -1,187 +0,0 @@
@prefix schema: <https://schema.org/> .
@prefix country: <https://daniel.degu.cl/data/countries.ttl#Country-> .
@prefix tm: <https://daniel.degu.cl/data/mig.ttl#-> .
country:Argentina a schema:Country ;
rdfs:label "Argentina"@en ;
tm:wikidataEntity wd:Q414 .
country:Austria a schema:Country ;
rdfs:label "Austria"@en ;
tm:wikidataEntity wd:Q40 .
country:Australia a schema:Country ;
rdfs:label "Australia"@en ;
tm:wikidataEntity wd:Q408 .
country:Azerbaijan a schema:Country ;
rdfs:label "Azerbaijan"@en ;
tm:wikidataEntity wd:Q227 .
country:Belgium a schema:Country ;
rdfs:label "Belgium"@en ;
tm:wikidataEntity wd:Q31 .
country:Belarus a schema:Country ;
rdfs:label "Belarus"@en ;
tm:wikidataEntity wd:Q184 .
country:Bulgaria a schema:Country ;
rdfs:label "Bulgaria"@en ;
tm:wikidataEntity wd:Q219 .
country:Brazil a schema:Country ;
rdfs:label "Brazil"@en ;
tm:wikidataEntity wd:Q155 .
country:Canada a schema:Country ;
rdfs:label "Canada"@en ;
tm:wikidataEntity wd:Q16 .
country:Switzerland a schema:Country ;
rdfs:label "Switzerland"@en ;
tm:wikidataEntity wd:Q39 .
country:Chile a schema:Country ;
rdfs:label "Chile"@en ;
tm:wikidataEntity wd:Q298 .
country:Ukraine a schema:Country ;
rdfs:label "Ukraine"@en ;
tm:wikidataEntity wd:Q212 .
country:Costa_Rica a schema:Country ;
rdfs:label "Costa Rica"@en ;
tm:wikidataEntity wd:Q800 .
country:Cuba a schema:Country ;
rdfs:label "Cuba"@en ;
tm:wikidataEntity wd:Q241 .
country:Czech_Republic a schema:Country ;
rdfs:label "Czech Republic"@en ;
tm:wikidataEntity wd:Q213 .
country:Denmark a schema:Country ;
rdfs:label "Denmark"@en ;
tm:wikidataEntity wd:Q35 .
country:Algeria a schema:Country ;
rdfs:label "Algeria"@en ;
tm:wikidataEntity wd:Q262 .
country:Egypt a schema:Country ;
rdfs:label "Egypt"@en ;
tm:wikidataEntity wd:Q79 .
country:El_Salvador a schema:Country ;
rdfs:label "El Salvador"@en ;
tm:wikidataEntity wd:Q792 .
country:Spain a schema:Country ;
rdfs:label "Spain"@en ;
tm:wikidataEntity wd:Q29 .
country:Fiji a schema:Country ;
rdfs:label "Fiji"@en ;
tm:wikidataEntity wd:Q712 .
country:France a schema:Country ;
rdfs:label "France"@en ;
tm:wikidataEntity wd:Q142 .
country:United_Kingdom a schema:Country ;
rdfs:label "United Kingdom"@en ;
tm:wikidataEntity wd:Q145 .
country:Germany a schema:Country ;
rdfs:label "Germany"@en ;
tm:wikidataEntity wd:Q183 .
country:Greece a schema:Country ;
rdfs:label "Greece"@en ;
tm:wikidataEntity wd:Q41 .
country:Croatia a schema:Country ;
rdfs:label "Croatia"@en ;
tm:wikidataEntity wd:Q224 .
country:Hungary a schema:Country ;
rdfs:label "Hungary"@en ;
tm:wikidataEntity wd:Q28 .
country:Slovakia a schema:Country ;
rdfs:label "Slovakia"@en ;
tm:wikidataEntity wd:Q214 .
country:Indonesia a schema:Country ;
rdfs:label "Indonesia"@en ;
tm:wikidataEntity wd:Q252 .
country:Ireland a schema:Country ;
rdfs:label "Ireland"@en ;
tm:wikidataEntity wd:Q27 .
country:India a schema:Country ;
rdfs:label "India"@en ;
tm:wikidataEntity wd:Q668 .
country:Israel a schema:Country ;
rdfs:label "Israel"@en ;
tm:wikidataEntity wd:Q801 .
country:Italy a schema:Country ;
rdfs:label "Italy"@en ;
tm:wikidataEntity wd:Q38 .
country:Japan a schema:Country ;
rdfs:label "Japan"@en ;
tm:wikidataEntity wd:Q17 .
country:Latvia a schema:Country ;
rdfs:label "Latvia"@en ;
tm:wikidataEntity wd:Q211 .
country:Lithuania a schema:Country ;
rdfs:label "Lithuania"@en ;
tm:wikidataEntity wd:Q37 .
country:Sri_Lanka a schema:Country ;
rdfs:label "Sri Lanka"@en ;
tm:wikidataEntity wd:Q854 .
country:Monaco a schema:Country ;
rdfs:label "Monaco"@en ;
tm:wikidataEntity wd:Q235 .
country:Myanmar a schema:Country ;
rdfs:label "Myanmar"@en ;
tm:wikidataEntity wd:Q836 .
country:Moldova a schema:Country ;
rdfs:label "Moldova"@en ;
tm:wikidataEntity wd:Q217 .
country:Mexico a schema:Country ;
rdfs:label "Mexico"@en ;
tm:wikidataEntity wd:Q96 .
country:Netherlands a schema:Country ;
rdfs:label "Netherlands"@en ;
tm:wikidataEntity wd:Q55 .
country:Norway a schema:Country ;
rdfs:label "Norway"@en ;
tm:wikidataEntity wd:Q20 .
country:New_Zealand a schema:Country ;
rdfs:label "New Zealand"@en ;
tm:wikidataEntity wd:Q664 .
country:Panama a schema:Country ;
rdfs:label "Panama"@en ;
tm:wikidataEntity wd:Q804 .
country:Peru a schema:Country ;
rdfs:label "Peru"@en ;
tm:wikidataEntity wd:Q419 .
country:Poland a schema:Country ;
rdfs:label "Poland"@en ;
tm:wikidataEntity wd:Q36 .
country:Paraguay a schema:Country ;
rdfs:label "Paraguay"@en ;
tm:wikidataEntity wd:Q733 .
country:Palestine a schema:Country ;
rdfs:label "Palestine"@en ;
tm:wikidataEntity wd:Q219060 .
country:Portugal a schema:Country ;
rdfs:label "Portugal"@en ;
tm:wikidataEntity wd:Q45 .
country:Romania a schema:Country ;
rdfs:label "Romania"@en ;
tm:wikidataEntity wd:Q218 .
country:Russia a schema:Country ;
rdfs:label "Russia"@en ;
tm:wikidataEntity wd:Q159 .
country:Sweden a schema:Country ;
rdfs:label "Sweden"@en ;
tm:wikidataEntity wd:Q34 .
country:Singapore a schema:Country ;
rdfs:label "Singapore"@en ;
tm:wikidataEntity wd:Q334 .
country:Slovenia a schema:Country ;
rdfs:label "Slovenia"@en ;
tm:wikidataEntity wd:Q215 .
country:Serbia a schema:Country ;
rdfs:label "Serbia"@en ;
tm:wikidataEntity wd:Q403 .
country:Turkey a schema:Country ;
rdfs:label "Turkey"@en ;
tm:wikidataEntity wd:Q43 .
country:United_States a schema:Country ;
rdfs:label "United States"@en ;
tm:wikidataEntity wd:Q30 .
country:Uruguay a schema:Country ;
rdfs:label "Uruguay"@en ;
tm:wikidataEntity wd:Q77 .
country:Vietnam a schema:Country ;
rdfs:label "Vietnam"@en ;
tm:wikidataEntity wd:Q881 .
country:South_Africa a schema:Country ;
rdfs:label "South Africa"@en ;
tm:wikidataEntity wd:Q258 .

View file

@ -1,24 +0,0 @@
Channel Islands
China
Columbia
Eastern Europe
England
Estland
Europe
Northern Ireland (UK)
ITaly
Korea
USA
North America
Poland / Ukraine
Prussia
Scandinavia
Scotland
Soviet Union
England (UK)
Wales (UK)
USa
UAS
West Europe
Yugoslavia

View file

@ -1,251 +0,0 @@
@prefix wd: <http://www.wikidata.org/entity/> .
@prefix wdt: <http://www.wikidata.org/prop/direct/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tm: <https://daniel.degu.cl/data/mig.ttl#> .
@prefix schema: <https://schema.org/> .
@prefix country: <https://daniel.degu.cl/data/countries.ttl#Country-> .
country:Argentina a schema:Country ;
rdfs:label "Argentina"@en ;
tm:wikidataEntity wd:Q414 ;
tm:geonamesEntiy geo:3865483 .
country:Austria a schema:Country ;
rdfs:label "Austria"@en ;
tm:wikidataEntity wd:Q40 ;
tm:geonamesEntiy geo:2782113 .
country:Australia a schema:Country ;
rdfs:label "Australia"@en ;
tm:wikidataEntity wd:Q408 ;
tm:geonamesEntiy geo:2077456 .
country:Azerbaijan a schema:Country ;
rdfs:label "Azerbaijan"@en ;
tm:wikidataEntity wd:Q227 ;
tm:geonamesEntiy geo:587116 .
country:Belgium a schema:Country ;
rdfs:label "Belgium"@en ;
tm:wikidataEntity wd:Q31 ;
tm:geonamesEntiy geo:2802361 .
country:Belarus a schema:Country ;
rdfs:label "Belarus"@en ;
tm:wikidataEntity wd:Q184 ;
tm:geonamesEntiy geo:630336 .
country:Bulgaria a schema:Country ;
rdfs:label "Bulgaria"@en ;
tm:wikidataEntity wd:Q219 ;
tm:geonamesEntiy geo:732800 .
country:Brazil a schema:Country ;
rdfs:label "Brazil"@en ;
tm:wikidataEntity wd:Q155 ;
tm:geonamesEntiy geo:3469034 .
country:Canada a schema:Country ;
rdfs:label "Canada"@en ;
tm:wikidataEntity wd:Q16 ;
tm:geonamesEntiy geo:6251999 .
country:Switzerland a schema:Country ;
rdfs:label "Switzerland"@en ;
tm:wikidataEntity wd:Q39 ;
tm:geonamesEntiy geo:2658434 .
country:Chile a schema:Country ;
rdfs:label "Chile"@en ;
tm:wikidataEntity wd:Q298 ;
tm:geonamesEntiy geo:3895114 .
country:Ukraine a schema:Country ;
rdfs:label "Ukraine"@en ;
tm:wikidataEntity wd:Q212 ;
tm:geonamesEntiy geo:690791 .
country:Costa_Rica a schema:Country ;
rdfs:label "Costa Rica"@en ;
tm:wikidataEntity wd:Q800 ;
tm:geonamesEntiy geo:3624060 .
country:Cuba a schema:Country ;
rdfs:label "Cuba"@en ;
tm:wikidataEntity wd:Q241 ;
tm:geonamesEntiy geo:3562981 .
country:Czech_Republic a schema:Country ;
rdfs:label "Czech Republic"@en ;
tm:wikidataEntity wd:Q213 ;
tm:geonamesEntiy geo:3077311 .
country:Denmark a schema:Country ;
rdfs:label "Denmark"@en ;
tm:wikidataEntity wd:Q35 ;
tm:geonamesEntiy geo:2623032 .
country:Algeria a schema:Country ;
rdfs:label "Algeria"@en ;
tm:wikidataEntity wd:Q262 ;
tm:geonamesEntiy geo:2589581 .
country:Egypt a schema:Country ;
rdfs:label "Egypt"@en ;
tm:wikidataEntity wd:Q79 ;
tm:geonamesEntiy geo:357994 .
country:El_Salvador a schema:Country ;
rdfs:label "El Salvador"@en ;
tm:wikidataEntity wd:Q792 ;
tm:geonamesEntiy geo:3585968 .
country:Spain a schema:Country ;
rdfs:label "Spain"@en ;
tm:wikidataEntity wd:Q29 ;
tm:geonamesEntiy geo:2510769 .
country:Fiji a schema:Country ;
rdfs:label "Fiji"@en ;
tm:wikidataEntity wd:Q712 ;
tm:geonamesEntiy geo:2205218 .
country:France a schema:Country ;
rdfs:label "France"@en ;
tm:wikidataEntity wd:Q142 ;
tm:geonamesEntiy geo:3017382 .
country:United_Kingdom a schema:Country ;
rdfs:label "United Kingdom"@en ;
tm:wikidataEntity wd:Q145 ;
tm:geonamesEntiy geo:2635167 .
country:Germany a schema:Country ;
rdfs:label "Germany"@en ;
tm:wikidataEntity wd:Q183 ;
tm:geonamesEntiy geo:2921044 .
country:Greece a schema:Country ;
rdfs:label "Greece"@en ;
tm:wikidataEntity wd:Q41 ;
tm:geonamesEntiy geo:390903 .
country:Croatia a schema:Country ;
rdfs:label "Croatia"@en ;
tm:wikidataEntity wd:Q224 ;
tm:geonamesEntiy geo:3202326 .
country:Hungary a schema:Country ;
rdfs:label "Hungary"@en ;
tm:wikidataEntity wd:Q28 ;
tm:geonamesEntiy geo:719819 .
country:Slovakia a schema:Country ;
rdfs:label "Slovakia"@en ;
tm:wikidataEntity wd:Q214 ;
tm:geonamesEntiy geo:3057568 .
country:Indonesia a schema:Country ;
rdfs:label "Indonesia"@en ;
tm:wikidataEntity wd:Q252 ;
tm:geonamesEntiy geo:1643084 .
country:Ireland a schema:Country ;
rdfs:label "Ireland"@en ;
tm:wikidataEntity wd:Q27 ;
tm:geonamesEntiy geo:2963597 .
country:India a schema:Country ;
rdfs:label "India"@en ;
tm:wikidataEntity wd:Q668 ;
tm:geonamesEntiy geo:1269750 .
country:Israel a schema:Country ;
rdfs:label "Israel"@en ;
tm:wikidataEntity wd:Q801 ;
tm:geonamesEntiy geo:294640 .
country:Italy a schema:Country ;
rdfs:label "Italy"@en ;
tm:wikidataEntity wd:Q38 ;
tm:geonamesEntiy geo:3175395 .
country:Japan a schema:Country ;
rdfs:label "Japan"@en ;
tm:wikidataEntity wd:Q17 ;
tm:geonamesEntiy geo:1861060 .
country:Latvia a schema:Country ;
rdfs:label "Latvia"@en ;
tm:wikidataEntity wd:Q211 ;
tm:geonamesEntiy geo:458258 .
country:Lithuania a schema:Country ;
rdfs:label "Lithuania"@en ;
tm:wikidataEntity wd:Q37 ;
tm:geonamesEntiy geo:597427 .
country:Sri_Lanka a schema:Country ;
rdfs:label "Sri Lanka"@en ;
tm:wikidataEntity wd:Q854 ;
tm:geonamesEntiy geo:1227603 .
country:Monaco a schema:Country ;
rdfs:label "Monaco"@en ;
tm:wikidataEntity wd:Q235 ;
tm:geonamesEntiy geo:2993457 .
country:Myanmar a schema:Country ;
rdfs:label "Myanmar"@en ;
tm:wikidataEntity wd:Q836 ;
tm:geonamesEntiy geo:1327865 .
country:Moldova a schema:Country ;
rdfs:label "Moldova"@en ;
tm:wikidataEntity wd:Q217 ;
tm:geonamesEntiy geo:617790 .
country:Mexico a schema:Country ;
rdfs:label "Mexico"@en ;
tm:wikidataEntity wd:Q96 ;
tm:geonamesEntiy geo:3996063 .
country:Netherlands a schema:Country ;
rdfs:label "Netherlands"@en ;
tm:wikidataEntity wd:Q55 ;
tm:geonamesEntiy geo:2750405 .
country:Norway a schema:Country ;
rdfs:label "Norway"@en ;
tm:wikidataEntity wd:Q20 ;
tm:geonamesEntiy geo:3144096 .
country:New_Zealand a schema:Country ;
rdfs:label "New Zealand"@en ;
tm:wikidataEntity wd:Q664 ;
tm:geonamesEntiy geo:2186224 .
country:Panama a schema:Country ;
rdfs:label "Panama"@en ;
tm:wikidataEntity wd:Q804 ;
tm:geonamesEntiy geo:3703430 .
country:Peru a schema:Country ;
rdfs:label "Peru"@en ;
tm:wikidataEntity wd:Q419 ;
tm:geonamesEntiy geo:3932488 .
country:Poland a schema:Country ;
rdfs:label "Poland"@en ;
tm:wikidataEntity wd:Q36 ;
tm:geonamesEntiy geo:798544 .
country:Paraguay a schema:Country ;
rdfs:label "Paraguay"@en ;
tm:wikidataEntity wd:Q733 ;
tm:geonamesEntiy geo:3437598 .
country:Palestine a schema:Country ;
rdfs:label "Palestine"@en ;
tm:wikidataEntity wd:Q219060 ;
tm:geonamesEntiy geo:6254930 .
country:Portugal a schema:Country ;
rdfs:label "Portugal"@en ;
tm:wikidataEntity wd:Q45 ;
tm:geonamesEntiy geo:2264397 .
country:Romania a schema:Country ;
rdfs:label "Romania"@en ;
tm:wikidataEntity wd:Q218 ;
tm:geonamesEntiy geo:798549 .
country:Russia a schema:Country ;
rdfs:label "Russia"@en ;
tm:wikidataEntity wd:Q159 ;
tm:geonamesEntiy geo:2017370 .
country:Sweden a schema:Country ;
rdfs:label "Sweden"@en ;
tm:wikidataEntity wd:Q34 ;
tm:geonamesEntiy geo:2661886 .
country:Singapore a schema:Country ;
rdfs:label "Singapore"@en ;
tm:wikidataEntity wd:Q334 ;
tm:geonamesEntiy geo:1880251 .
country:Slovenia a schema:Country ;
rdfs:label "Slovenia"@en ;
tm:wikidataEntity wd:Q215 ;
tm:geonamesEntiy geo:3190538 .
country:Serbia a schema:Country ;
rdfs:label "Serbia"@en ;
tm:wikidataEntity wd:Q403 ;
tm:geonamesEntiy geo:6290252 .
country:Turkey a schema:Country ;
rdfs:label "Turkey"@en ;
tm:wikidataEntity wd:Q43 ;
tm:geonamesEntiy geo:298795 .
country:United_States a schema:Country ;
rdfs:label "United States"@en ;
tm:wikidataEntity wd:Q30 ;
tm:geonamesEntiy geo:6252001 .
country:Uruguay a schema:Country ;
rdfs:label "Uruguay"@en ;
tm:wikidataEntity wd:Q77 ;
tm:geonamesEntiy geo:3439705 .
country:Vietnam a schema:Country ;
rdfs:label "Vietnam"@en ;
tm:wikidataEntity wd:Q881 ;
tm:geonamesEntiy geo:1562822 .
country:South_Africa a schema:Country ;
rdfs:label "South Africa"@en ;
tm:wikidataEntity wd:Q258 ;
tm:geonamesEntiy geo:953987 .

View file

@ -1,30 +0,0 @@
@prefix wd: <http://www.wikidata.org/entity/> .
@prefix wdt: <http://www.wikidata.org/prop/direct/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tm: <https://daniel.degu.cl/data/mig.ttl#> .
@prefix schema: <https://schema.org/> .
@prefix country: <https://daniel.degu.cl/data/countries.ttl#Country-> .
Channel Islands
China
Columbia
Eastern Europe
England
Estland
Europe
Northern Ireland (UK)
ITaly
Korea
USA
North America
Poland / Ukraine
Prussia
Scandinavia
Scotland
Soviet Union
England (UK)
Wales (UK)
USa
UAS
West Europe
Yugoslavia

View file

@ -1,208 +0,0 @@
@prefix tm: <https://daniel.degu.cl/data/theater-migrants/mig.ttl#> .
@prefix person: <https://daniel.degu.cl/data/theater-migrants/persons.ttl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix religion: <https://daniel.degu.cl/data/theater-migrants/religions.ttl#> .
@prefix schema: <https://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
religion:196 a tm:ReligionAffiliation ;
tm:person person:BecMar-00 ;
tm:religion religion:Judaism ;
rdfs:comment "Was born to a Jewish family" .
religion:199 a tm:ReligionAffiliation ;
tm:person person:GerBer-00 ;
tm:religion religion:Judaism ;
rdfs:comment "Jewish, her mother was an Orthodox Jew" .
religion:205 a tm:ReligionAffiliation ;
tm:person person:GluAlm-00 ;
tm:religion religion:Judaism ;
rdfs:comment "Jewish, showing attraction to Anglican Christianity (attended the Episcopal Church in New Hartford), in addition, all three of her children were baptized" .
religion:208 a tm:ReligionAffiliation ;
tm:person person:GolAbr-00 ;
tm:religion religion:Judaism ;
rdfs:comment "Yew" .
religion:211 a tm:ReligionAffiliation ;
tm:person person:GolAbr-00 ;
tm:dateStartFuzzy "1883" ;
rdfs:comment "Bar Kochba (1883) steht im Zeichen des beginnenden Zionismus" .
religion:217 a tm:ReligionAffiliation ;
tm:person person:HelAnn-00 ;
tm:religion religion:Judaism ;
rdfs:comment "May have converted from Judaism to Roman Catholicism as she married Carrera." .
religion:218 a tm:ReligionAffiliation ;
tm:person person:HelAnn-00 ;
tm:religion religion:Christianity .
religion:220 a tm:ReligionAffiliation ;
tm:person person:KalBer-00 ;
tm:religion religion:Judaism ;
rdfs:comment "Jewish; Fifteen hundred people attended her funeral, considered a disappointing turnout, considering her status in the Jewish community. She had come to be seen as \"a relic of the theatrical past, with a manner too romantic and grand even for the Yiddish stage\"\n" .
religion:223 a tm:ReligionAffiliation ;
tm:person person:KreEli-00 ;
tm:religion religion:Judaism ;
rdfs:comment "baptised evangelical Christian (as a baby), comes from a Jewish family (negative thematised in the wedding to Paul von Thurn und Taxis)" .
religion:224 a tm:ReligionAffiliation ;
tm:person person:KreEli-00 ;
tm:religion religion:Christianity .
religion:226 a tm:ReligionAffiliation ;
tm:person person:KroSel-00 ;
tm:religion religion:Judaism ;
rdfs:comment "Family with jewish roots" .
religion:229 a tm:ReligionAffiliation ;
tm:person person:LewAug-00 ;
tm:religion religion:Judaism ;
rdfs:comment "Israelitisch" .
religion:232 a tm:ReligionAffiliation ;
tm:person person:LewAug-00 ;
tm:religion religion:Christianity ;
tm:dateStartFuzzy "1812" ;
tm:dateStart "1812-01-01"^^xsd:date ;
rdfs:comment "evangelical" .
religion:235 a tm:ReligionAffiliation ;
tm:person person:LewAug-00 ;
tm:religion religion:Christianity ;
tm:dateStartFuzzy "1852" ;
tm:dateStart "1852-01-01"^^xsd:date ;
rdfs:comment "catholic" .
religion:238 a tm:ReligionAffiliation ;
tm:person person:LewAug-00 ;
rdfs:comment "Ultramontanismus" .
religion:244 a tm:ReligionAffiliation ;
tm:person person:MahGus-00 ;
tm:religion religion:Judaism ;
tm:dateStart "1897-02-23"^^xsd:date ;
rdfs:comment "converted to Catholicism and was baptized\n“My Judaism, as things are now in the world, prevents me from entering any court theater. - Not Vienna, not Berlin, not Dresden, not Munich is open to me. The same wind blows everywhere. \"(Letter to Friedrich Löhr 1804)" .
religion:245 a tm:ReligionAffiliation ;
tm:person person:MahGus-00 ;
tm:religion religion:Christianity .
religion:247 a tm:ReligionAffiliation ;
tm:person person:NazAll-00 ;
tm:religion religion:Judaism ;
rdfs:comment "Nazimova was born into a jewish family but raised a Catholic. Later she declared, her only faith was in her art." .
religion:248 a tm:ReligionAffiliation ;
tm:person person:NazAll-00 ;
tm:religion religion:Christianity .
religion:250 a tm:ReligionAffiliation ;
tm:person person:PolBer-00 ;
tm:religion religion:Judaism ;
rdfs:comment "He came from fervent jewish family" .
religion:253 a tm:ReligionAffiliation ;
tm:person person:RehAda-00 ;
tm:religion religion:Christianity ;
tm:dateStart "1857-06-12"^^xsd:date ;
rdfs:comment "baptised in St Michael's Roman Catholic Church" .
religion:259 a tm:ReligionAffiliation ;
tm:person person:SchErn-00 ;
tm:religion religion:Judaism ;
rdfs:comment "Baptized catholic but her maternal grandmother, Leah Kohn, was of Hungarian Jewish descent. Affirmed her Jewish ancestry proudly, fervently opposing the Hitler regime" .
religion:260 a tm:ReligionAffiliation ;
tm:person person:SchErn-00 ;
tm:religion religion:Christianity .
religion:262 a tm:ReligionAffiliation ;
tm:person person:StrAle-00 ;
tm:religion religion:Judaism ;
rdfs:comment "Jewish" .
religion:265 a tm:ReligionAffiliation ;
tm:person person:StrAle-00 ;
tm:religion religion:Christianity ;
rdfs:comment "was destined to become a preacher" .
religion:268 a tm:ReligionAffiliation ;
tm:person person:TucSop-00 ;
tm:religion religion:Judaism ;
rdfs:comment "Her parents were Russian Jews" .
religion:272 a tm:ReligionAffiliation ;
tm:person person:HamOsc-00 ;
tm:religion religion:Judaism ;
rdfs:comment "Jewish" .
religion:338 a tm:ReligionAffiliation ;
tm:person person:KorFri-00 ;
tm:religion religion:Judaism ;
rdfs:comment "jewish" .
religion:347 a tm:ReligionAffiliation ;
tm:person person:LubErn-00 ;
tm:religion religion:Judaism ;
rdfs:comment "Ashkenazi Jewish" .
religion:355 a tm:ReligionAffiliation ;
tm:person person:KreHei-00 ;
tm:religion religion:Judaism ;
tm:dateStartFuzzy "1871" ;
tm:dateStart "1871-01-01"^^xsd:date ;
tm:dateStartMax "1873" ;
tm:dateEndMin "1873-01-01"^^xsd:date ;
tm:dateEndMax "1873-12-31"^^xsd:date ;
rdfs:comment "He converted to the Catholic faith at the age of 54 as part of the assimilation of wider Jewish circles after the \"Interconfessional Laws\" of 1868 in Austria allowed a change of religion. He had all his children baptised Protestants in the places where they were born and where he had a stage engagement in each case." .
religion:356 a tm:ReligionAffiliation ;
tm:person person:KreHei-00 ;
tm:religion religion:Christianity .
religion:358 a tm:ReligionAffiliation ;
tm:person person:BoiCur-00 ;
tm:religion religion:Judaism ;
rdfs:comment "jewish" .
religion:387 a tm:ReligionAffiliation ;
tm:person person:GruFri-00 ;
tm:religion religion:Judaism ;
rdfs:comment "Jewish" .
religion:416 a tm:ReligionAffiliation ;
tm:person person:LevHer-00 ;
tm:religion religion:Judaism ;
rdfs:comment "Born in a Jewish family he was no active jude, but did not baptize" .
religion:423 a tm:ReligionAffiliation ;
tm:person person:ZemAle-00 ;
tm:religion religion:Judaism ;
tm:dateStartFuzzy "1899" ;
tm:dateStart "1899-01-01"^^xsd:date ;
rdfs:comment "In 1899 he resigned from the Israelite religious community because the climate for Jews in Vienna was deteriorating." .
religion:429 a tm:ReligionAffiliation ;
tm:person person:ZemAle-00 ;
tm:religion religion:Christianity ;
tm:dateStartFuzzy "1906" ;
tm:dateStart "1906-01-01"^^xsd:date ;
rdfs:comment "converting to Protestantism." .
religion:431 a tm:ReligionAffiliation ;
tm:person person:KelAlf-00 ;
tm:religion religion:Christianity .
religion:445 a tm:ReligionAffiliation ;
tm:person person:StrFri-00 ;
tm:religion religion:Christianity ;
tm:denomination "Protestant" .
religion:446 a tm:ReligionAffiliation ;
tm:person person:HerAde-00 ;
tm:religion religion:Christianity .

177
data/occupations.ttl Normal file
View file

@ -0,0 +1,177 @@
@prefix occupation: <https://daniel.degu.cl/data/theater-migrants/occupations.ttl#> .
@prefix schema: <https://schema.org/> .
occupation:Actor a schema:Occupation ;
schema:name "Actor" .
occupation:Advertiser a schema:Occupation ;
schema:name "Advertiser" .
occupation:Agent a schema:Occupation ;
schema:name "Agent" .
occupation:Assistant a schema:Occupation ;
schema:name "Assistant" .
occupation:Author a schema:Occupation ;
schema:name "Author" .
occupation:Ballet_master a schema:Occupation ;
schema:name "Ballet master" .
occupation:Businesswoman a schema:Occupation ;
schema:name "Businesswoman" .
occupation:Cartoonist a schema:Occupation ;
schema:name "Cartoonist" .
occupation:Ceramist a schema:Occupation ;
schema:name "Ceramist" .
occupation:Choreographer a schema:Occupation ;
schema:name "Choreographer" .
occupation:Circus_Performer a schema:Occupation ;
schema:name "Circus Performer" .
occupation:Comedian a schema:Occupation ;
schema:name "Comedian" .
occupation:Composer a schema:Occupation ;
schema:name "Composer" .
occupation:Customier a schema:Occupation ;
schema:name "Customier" .
occupation:Cutter a schema:Occupation ;
schema:name "Cutter" .
occupation:Dancer a schema:Occupation ;
schema:name "Dancer" .
occupation:Director a schema:Occupation ;
schema:name "Director" .
occupation:Dramaturg a schema:Occupation ;
schema:name "Dramaturg" .
occupation:Elocution_teacher a schema:Occupation ;
schema:name "Elocution teacher" .
occupation:Emcee a schema:Occupation ;
schema:name "Emcee" .
occupation:English_Teacher a schema:Occupation ;
schema:name "English Teacher" .
occupation:Farmer a schema:Occupation ;
schema:name "Farmer" .
occupation:Feminist a schema:Occupation ;
schema:name "Feminist" .
occupation:Film_producer a schema:Occupation ;
schema:name "Film producer" .
occupation:Founder a schema:Occupation ;
schema:name "Founder" .
occupation:French_Teacher a schema:Occupation ;
schema:name "French Teacher" .
occupation:Hotel_Founder a schema:Occupation ;
schema:name "Hotel Founder" .
occupation:Impresario a schema:Occupation ;
schema:name "Impresario" .
occupation:Intendant a schema:Occupation ;
schema:name "Intendant" .
occupation:Journalist a schema:Occupation ;
schema:name "Journalist" .
occupation:Kleinkuenstler a schema:Occupation ;
schema:name "Kleinkuenstler" .
occupation:Magician a schema:Occupation ;
schema:name "Magician" .
occupation:Manager a schema:Occupation ;
schema:name "Manager" .
occupation:Merchant a schema:Occupation ;
schema:name "Merchant" .
occupation:Movie_Producer a schema:Occupation ;
schema:name "Movie Producer" .
occupation:Music_Director a schema:Occupation ;
schema:name "Music Director" .
occupation:Music_Educator a schema:Occupation ;
schema:name "Music Educator" .
occupation:Musician a schema:Occupation ;
schema:name "Musician" .
occupation:Opera a schema:Occupation ;
schema:name "Opera" .
occupation:Opera_Correpetitor a schema:Occupation ;
schema:name "Opera Correpetitor" .
occupation:Painter a schema:Occupation ;
schema:name "Painter" .
occupation:Pantomime_Artist a schema:Occupation ;
schema:name "Pantomime Artist" .
occupation:Performer a schema:Occupation ;
schema:name "Performer" .
occupation:Photographer a schema:Occupation ;
schema:name "Photographer" .
occupation:President a schema:Occupation ;
schema:name "President" .
occupation:Priest a schema:Occupation ;
schema:name "Priest" .
occupation:Producer a schema:Occupation ;
schema:name "Producer" .
occupation:Rabbi a schema:Occupation ;
schema:name "Rabbi" .
occupation:Rancher a schema:Occupation ;
schema:name "Rancher" .
occupation:Reciter a schema:Occupation ;
schema:name "Reciter" .
occupation:Seamstress a schema:Occupation ;
schema:name "Seamstress" .
occupation:Singer a schema:Occupation ;
schema:name "Singer" .
occupation:Stage_Designer a schema:Occupation ;
schema:name "Stage Designer" .
occupation:Stage_manager a schema:Occupation ;
schema:name "Stage manager" .
occupation:Teacher a schema:Occupation ;
schema:name "Teacher" .
occupation:Technician a schema:Occupation ;
schema:name "Technician" .
occupation:Trader a schema:Occupation ;
schema:name "Trader" .
occupation:Translator a schema:Occupation ;
schema:name "Translator" .

View file

@ -0,0 +1,12 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix religion: <https://daniel.degu.cl/data/theater-migrants/religions.ttl#> .
@prefix schema: <https://schema.org/> .
@prefix wd: <http://www.wikidata.org/entity/> .
@prefix wdt: <http://www.wikidata.org/prop/direct/> .
religion:Buddhism schema:sameAs wd:Q748 .
religion:Christianity schema:sameAs wd:Q5043 .
religion:Hinduism schema:sameAs wd:Q9089 .
religion:Judaism schema:sameAs wd:Q9268 .
religion:Islam schema:sameAs wd:Q432 .

View file

@ -1,7 +1,7 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix religion: <https://daniel.degu.cl/data/theater-migrants/religions.ttl#> .
@prefix schema: <https://schema.org/> .
@prefix wd: <http://www.wikidata.org/entity/> . @prefix wd: <http://www.wikidata.org/entity/> .
@prefix wdt: <http://www.wikidata.org/prop/direct/> . @prefix wdt: <http://www.wikidata.org/prop/direct/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tm: <https://daniel.degu.cl/data/mig.ttl#> .
@prefix schema: <https://schema.org/> .
@prefix country: <https://daniel.degu.cl/data/countries.ttl#Country-> .

View file

@ -0,0 +1,52 @@
#!/usr/bin/env ruby
require 'rdf'
require 'rdf/turtle'
require_relative 'database'
require_relative 'vocabularies'
require_relative 'migrants'
graph = RDF::Graph.load(File.join('data', 'religions.ttl'))
output = File.open(File.join('data', 'religions_wikidata.ttl'), 'w')
review = File.open(File.join('data', 'religions_wikidata_review.ttl'), 'w')
ttl_prefixes = "#{prefixes(:wd, :wdt, :rdfs, :schema, :religion)}\n\n"
output << ttl_prefixes
review << ttl_prefixes
graph.query([nil, RDF.type, TM.Religion]) do |stmt|
subject = stmt.subject
label_stmt = graph.query([subject, RDFS.label, nil]).first
next unless label_stmt
label = label_stmt.object
local_name = subject.to_s.sub(RELIGION.to_s, '')
solutions = WIKIDATA.query(<<~SPARQL)
SELECT DISTINCT ?religion WHERE {
?religion rdfs:label #{label.to_ntriples} .
?religion wdt:P31/wdt:P279* wd:Q9174 .
}
SPARQL
case solutions.size
when 0
review.puts "# No Wikidata entity found for #{label}"
review.puts "religion:#{local_name} rdfs:comment \"No Wikidata entity found\" ."
review.puts
when 1
wd_id = get_wd_name(solutions.first[:religion].to_s)
output.puts "religion:#{local_name} schema:sameAs #{wd_id} ."
else
review.puts "# Multiple Wikidata entities found for #{label} — remove all but one:"
solutions.each do |solution|
wd_id = get_wd_name(solution[:religion].to_s)
review.puts "religion:#{local_name} schema:sameAs #{wd_id} ."
end
review.puts
end
end
output.close
review.close

35
src/map_migration_table.rb Executable file
View file

@ -0,0 +1,35 @@
#!/usr/bin/env ruby
require_relative 'database'
require_relative 'vocabularies'
require_relative 'migrants'
output = File.open(File.join('data', 'migrations.ttl'), 'w')
output.puts prefixes(:rdfs, :tm, :person, :location, :migration)
output.puts
DB[:migration_table].each do |row|
id = row[:IDMig]
props = ["a tm:Migration"]
props << "tm:person person:#{row[:IDPerson]}" unless row[:IDPerson].to_s.empty?
props << "tm:startPlace location:#{row[:IDStartPlace]}" unless row[:IDStartPlace].to_s.empty?
props << "tm:destPlace location:#{row[:IDDestPlace]}" unless row[:IDDestPlace].to_s.empty?
props << "tm:dateStartFuzzy #{ttl_literal(row[:DateStart_Fuzzy])}" unless row[:DateStart_Fuzzy].to_s.empty?
props << "tm:dateStartMin #{ttl_literal(row[:DateStart_Min])}" if row[:DateStart_Min]
props << "tm:dateStartMax #{ttl_literal(row[:DateStart_Max])}" if row[:DateStart_Max]
props << "tm:dateEndFuzzy #{ttl_literal(row[:DateEnd_Fuzzy])}" unless row[:DateEnd_Fuzzy].to_s.empty?
props << "tm:dateEndMin #{ttl_literal(row[:DateEnd_Min])}" if row[:DateEnd_Min]
props << "tm:dateEndMax #{ttl_literal(row[:DateEnd_Max])}" if row[:DateEnd_Max]
props << "tm:reason #{ttl_literal(row[:reason])}" unless row[:reason].to_s.empty?
props << "tm:reason2 #{ttl_literal(row[:reason2])}" unless row[:reason2].to_s.empty?
props << "tm:via #{ttl_literal(row[:via])}" unless row[:via].to_s.empty?
output.puts "migration:#{id} #{props.first} ;"
props[1..-2].each { |p| output.puts " #{p} ;" }
output.puts " #{props.last} ."
output.puts
end
output.close

View file

@ -0,0 +1,25 @@
#!/usr/bin/env ruby
require 'set'
require_relative 'database'
require_relative 'vocabularies'
require_relative 'migrants'
output = File.open(File.join('data', 'occupations.ttl'), 'w')
output.puts prefixes(:schema, :occupation)
output.puts
seen = Set.new
DB[:person_profession].distinct.select(:profession).where(Sequel.~(profession: nil)).where(Sequel.~(profession: 'Other')).order(:profession).each do |row|
name = row[:profession].strip
next if name.empty?
next unless seen.add?(name.downcase)
output.puts "occupation:#{toName(name)} a schema:Occupation ;"
output.puts " schema:name #{ttl_literal(name)} ."
output.puts
end
output.close

27
src/map_organisation.rb Executable file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env ruby
require_relative 'database'
require_relative 'vocabularies'
require_relative 'migrants'
output = File.open(File.join('data', 'organisations.ttl'), 'w')
output.puts prefixes(:rdfs, :tm, :schema, :location, :organisation)
output.puts
DB[:organisation].each do |row|
id = row[:IDOrganisation]
props = ["a schema:Organization"]
props << "schema:name #{ttl_literal(row[:inst_name])}" unless row[:inst_name].to_s.empty?
props << "tm:institutionType #{ttl_literal(row[:InstType])}" unless row[:InstType].to_s.empty?
props << "schema:location location:#{row[:IDLocation]}" unless row[:IDLocation].to_s.empty?
props << "rdfs:comment #{ttl_literal(row[:comment])}" unless row[:comment].to_s.empty?
output.puts "organisation:#{id} #{props.first} ;"
props[1..-2].each { |p| output.puts " #{p} ;" }
output.puts " #{props.last} ."
output.puts
end
output.close

27
src/map_person_profession.rb Executable file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env ruby
require_relative 'database'
require_relative 'vocabularies'
require_relative 'migrants'
output = File.open(File.join('data', 'persons_occupations.ttl'), 'w')
output.puts prefixes(:rdfs, :tm, :schema, :person, :profession, :occupation)
output.puts
DB[:person_profession].each do |row|
puts "mapping persons occupations #{row[:IDProfPerson]}"
id = row[:IDProfPerson]
props = ["a tm:PersonOccupation"]
props << "tm:person person:#{row[:IDPerson]}" unless row[:IDPerson].to_s.empty?
props << "schema:occupation occupation:#{toName(row[:profession])}" unless row[:profession].to_s.empty?
props << "tm:standardProfession #{ttl_literal(row[:Eprofession])}" unless row[:Eprofession].to_s.empty?
output.puts "personOccupation:#{id} #{props.first} ;"
props[1..-2].each { |p| output.puts " #{p} ;" }
output.puts " #{props.last} ."
output.puts
end
output.close

34
src/map_personnames.rb Executable file
View file

@ -0,0 +1,34 @@
#!/usr/bin/env ruby
require_relative 'database'
require_relative 'vocabularies'
require_relative 'migrants'
output = File.open(File.join('data', 'personnames.ttl'), 'w')
output.puts prefixes(:rdfs, :tm, :schema, :person, :personname)
output.puts
DB[:personnames].each do |row|
id = row[:IDPersonname]
props = ["a tm:PersonName"]
props << "tm:person person:#{row[:IDPerson]}" unless row[:IDPerson].to_s.empty?
props << "schema:givenName #{ttl_literal(row[:personName])}" unless row[:personName].to_s.empty?
props << "schema:familyName #{ttl_literal(row[:personSurName])}" unless row[:personSurName].to_s.empty?
props << "tm:nameType #{ttl_literal(row[:Nametype])}" unless row[:Nametype].to_s.empty?
props << "tm:dateStartFuzzy #{ttl_literal(row[:DateStart_Fuzzy])}" unless row[:DateStart_Fuzzy].to_s.empty?
props << "tm:dateStartMin #{ttl_literal(row[:DateStart_Min])}" if row[:DateStart_Min]
props << "tm:dateStartMax #{ttl_literal(row[:DateStart_Max])}" if row[:DateStart_Max]
props << "tm:dateEndFuzzy #{ttl_literal(row[:DateEnd_Fuzzy])}" unless row[:DateEnd_Fuzzy].to_s.empty?
props << "tm:dateEndMin #{ttl_literal(row[:DateEnd_Min])}" if row[:DateEnd_Min]
props << "tm:dateEndMax #{ttl_literal(row[:DateEnd_Max])}" if row[:DateEnd_Max]
props << "rdfs:comment #{ttl_literal(row[:comment])}" unless row[:comment].to_s.empty?
output.puts "personname:#{id} #{props.first} ;"
props[1..-2].each { |p| output.puts " #{p} ;" }
output.puts " #{props.last} ."
output.puts
end
output.close

0
src/map_persons.rb Normal file → Executable file
View file

37
src/map_relationship.rb Executable file
View file

@ -0,0 +1,37 @@
#!/usr/bin/env ruby
require_relative 'database'
require_relative 'vocabularies'
require_relative 'migrants'
output = File.open(File.join('data', 'relationships.ttl'), 'w')
output.puts prefixes(:rdfs, :tm, :person, :location, :organisation, :relationship)
output.puts
DB[:relationship].each do |row|
id = row[:IDRel]
props = ["a tm:Relationship"]
props << "tm:activePerson person:#{row[:IDPerson_active]}" unless row[:IDPerson_active].to_s.empty?
props << "tm:passivePerson person:#{row[:IDPerson_passive]}" unless row[:IDPerson_passive].to_s.empty?
props << "tm:relationshipType #{ttl_literal(row[:Relationshiptype])}" unless row[:Relationshiptype].to_s.empty?
props << "tm:relationshipTypePrecise #{ttl_literal(row[:relationshiptype_precise])}" unless row[:relationshiptype_precise].to_s.empty?
props << "tm:dateStartFuzzy #{ttl_literal(row[:DateStart_Fuzzy])}" unless row[:DateStart_Fuzzy].to_s.empty?
props << "tm:dateStartMin #{ttl_literal(row[:DateStart_Min])}" if row[:DateStart_Min]
props << "tm:dateStartMax #{ttl_literal(row[:DateStart_Max])}" if row[:DateStart_Max]
props << "tm:dateEndFuzzy #{ttl_literal(row[:DateEnd_Fuzzy])}" unless row[:DateEnd_Fuzzy].to_s.empty?
props << "tm:dateEndMin #{ttl_literal(row[:DateEnd_Min])}" if row[:DateEnd_Min]
props << "tm:dateEndMax #{ttl_literal(row[:DateEnd_Max])}" if row[:DateEnd_Max]
props << "tm:location location:#{row[:IDLocation]}" unless row[:IDLocation].to_s.empty?
props << "tm:organisation organisation:#{row[:IDOrganisation]}" unless row[:IDOrganisation].to_s.empty?
props << "tm:timePeriod #{ttl_literal(row[:Timeperiod])}" unless row[:Timeperiod].to_s.empty?
props << "rdfs:comment #{ttl_literal(row[:comment])}" unless row[:comment].to_s.empty?
output.puts "relationship:#{id} #{props.first} ;"
props[1..-2].each { |p| output.puts " #{p} ;" }
output.puts " #{props.last} ."
output.puts
end
output.close

39
src/map_work.rb Executable file
View file

@ -0,0 +1,39 @@
#!/usr/bin/env ruby
require_relative 'database'
require_relative 'vocabularies'
require_relative 'migrants'
output = File.open(File.join('data', 'works.ttl'), 'w')
output.puts prefixes(:rdfs, :tm, :person, :location, :organisation, :work)
output.puts
DB[:work].each do |row|
id = row[:IDWork]
props = ["a tm:WorkRecord"]
props << "tm:person person:#{row[:IDPerson]}" unless row[:IDPerson].to_s.empty?
props << "tm:location location:#{row[:IDLocation]}" unless row[:IDLocation].to_s.empty?
props << "tm:organisation organisation:#{row[:IDOrganisation]}" unless row[:IDOrganisation].to_s.empty?
props << "tm:organisation organisation:#{row[:IDOrganisation2]}" unless row[:IDOrganisation2].to_s.empty?
props << "tm:dateStartFuzzy #{ttl_literal(row[:DateStart_Fuzzy])}" unless row[:DateStart_Fuzzy].to_s.empty?
props << "tm:dateStartMin #{ttl_literal(row[:DateStart_Min])}" if row[:DateStart_Min]
props << "tm:dateStartMax #{ttl_literal(row[:DateStart_Max])}" if row[:DateStart_Max]
props << "tm:dateEndFuzzy #{ttl_literal(row[:DateEnd_Fuzzy])}" unless row[:DateEnd_Fuzzy].to_s.empty?
props << "tm:dateEndMin #{ttl_literal(row[:DateEnd_Min])}" if row[:DateEnd_Min]
props << "tm:dateEndMax #{ttl_literal(row[:DateEnd_Max])}" if row[:DateEnd_Max]
props << "tm:employment #{ttl_literal(row[:Employment])}" unless row[:Employment].to_s.empty?
props << "tm:profession #{ttl_literal(row[:Profession])}" unless row[:Profession].to_s.empty?
props << "tm:profession2 #{ttl_literal(row[:Profession2])}" unless row[:Profession2].to_s.empty?
props << "tm:profession3 #{ttl_literal(row[:Profession3])}" unless row[:Profession3].to_s.empty?
props << "tm:employmentType #{ttl_literal(row[:EmploymentType])}" unless row[:EmploymentType].to_s.empty?
props << "rdfs:comment #{ttl_literal(row[:comment])}" unless row[:comment].to_s.empty?
output.puts "work:#{id} #{props.first} ;"
props[1..-2].each { |p| output.puts " #{p} ;" }
output.puts " #{props.last} ."
output.puts
end
output.close

View file

@ -10,11 +10,18 @@ XSD = RDF::Vocabulary.new('http://www.w3.org/2001/XMLSchema#')
# Internal vocabularies # Internal vocabularies
COUNTRY = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/countries.ttl#Country-') COUNTRY = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/countries.ttl#Country-')
TM = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/mig.ttl#') TM = RDF::Vocabulary.new('https://daniel.degu.cl/data/theather-migrants/ontology.ttl#')
PERSON = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/persons.ttl#') PERSON = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/persons.ttl#')
LOCATION = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/locations.ttl#') LOCATION = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/locations.ttl#')
OCCUPATION = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/occupations.ttl#')
MIGRATION = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/migrations.ttl#')
ORGANISATION = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/organisations.ttl#')
PERSONNAME = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/personnames.ttl#')
PERSON_OCCUPATION = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/person_occupations.ttl#')
REGION = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/regions.ttl#') REGION = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/regions.ttl#')
RELATIONSHIP = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/relationships.ttl#')
RELIGION = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/religions.ttl#') RELIGION = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/religions.ttl#')
WORK = RDF::Vocabulary.new('https://daniel.degu.cl/data/theater-migrants/works.ttl#')
# Mapping from symbols to prefixes # Mapping from symbols to prefixes
PREFIXES = { PREFIXES = {
@ -26,9 +33,16 @@ PREFIXES = {
tm: TM, tm: TM,
person: PERSON, person: PERSON,
location: LOCATION, location: LOCATION,
migration: MIGRATION,
occupation: OCCUPATION,
organisation: ORGANISATION,
personname: PERSONNAME,
personOccupation: PROFESSION,
region: REGION, region: REGION,
relationship: RELATIONSHIP,
religion: RELIGION, religion: RELIGION,
skos: SKOS, skos: SKOS,
work: WORK,
xsd: XSD xsd: XSD
} }