# For PersonProfession instances with a professionLabel, # create a schema:Occupation from the label and add a direct # schema:hasOccupation link from the person to it. # Affects 730 PersonProfession instances. PREFIX tm: PREFIX schema: PREFIX skos: PREFIX rdfs: INSERT { ?person schema:hasOccupation ?occupation . ?occupation a schema:Occupation . ?occupation a skos:Concept . ?occupation schema:name ?labelEN . ?occupation rdfs:label ?labelEN . ?occupation skos:prefLabel ?labelEN . } WHERE { ?pp a tm:PersonProfession . ?pp tm:personProfessionPerson ?person . ?pp tm:professionLabel ?label . BIND(STRLANG(REPLACE(STR(?label), "\\s+$", ""), "en") AS ?labelEN) BIND(IRI(CONCAT( "http://example.org/migrants/Profession-", ENCODE_FOR_URI(REPLACE(STR(?label), "\\s+", "")) )) AS ?occupation) }