Skip to content

Instantly share code, notes, and snippets.

View pasqLisena's full-sized avatar

Pasquale Lisena pasqLisena

View GitHub Profile
@pasqLisena
pasqLisena / bands-transformer.json
Created October 30, 2020 09:14
GRLC + SPARQL Transformer example
{
"proto": {
"band": "?s$anchor",
"label": "$rdfs:label$required?bestlang",
"genre": "$dbo:genre$var:_genre_iri",
"hometown": "dbo:hometown$var:_hometown_iri",
},
"$lang": "en;q=1, en-gb;q=0.5, en-us;q-0.4 *;q=0.1",
"$prefixes": {
"dbo": "http://dbpedia.org/ontology/",
@pasqLisena
pasqLisena / grlc-silknow-example.js
Created May 11, 2020 14:20
GRLC SILKNOW example
// Uncomment next line if in NodeJS
// const fetch = require("node-fetch");
async function run() {
const results = []; // this can also be a global variable to update
let next = 'http://grlc.eurecom.fr/api-git/silknow/api/obj_map?endpoint=http%3A%2F%2Fdata.silknow.org%2Fsparql'
while (next) {
let response = await fetch(next);
let data = await response.json();
@pasqLisena
pasqLisena / index.js
Created February 1, 2019 10:18
Brute force turtle files splitter
/*
* Brute force turtle files splitter
* npm install argparse fs-extra
* node index.js --input /Users/pasquale/Desktop/aat/all/redomi_part1.ttl --output ./out
*/
const fs = require('fs-extra');
const { ArgumentParser } = require('argparse');
@pasqLisena
pasqLisena / bnf.moonlight.ttl
Created January 31, 2017 16:07
Manifestation modelling - BnF example
@prefix crm: <http://www.cidoc-crm.org/cidoc-crm/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix ecrm: <http://erlangen-crm.org/current/> .
@prefix efrbroo: <http://erlangen-crm.org/efrbroo/> .
@prefix mus: <http://data.doremus.org/ontology#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .