Skip to content

Instantly share code, notes, and snippets.

View VladimirAlexiev's full-sized avatar

Vladimir Alexiev VladimirAlexiev

View GitHub Profile
@VladimirAlexiev
VladimirAlexiev / README.md
Created February 5, 2021 14:16
run pylode ontology doc gen on schema.org

https://github.com/RDFLib/pyLODE

RDFLib/pyLODE#108 : better support for SDO constructs

wget https://schema.org/version/latest/schemaorg-current-http.ttl 
# https://github.com/schemaorg/schemaorg/issues/2831 : add owl:Ontology and rdfs:isDefinedBy
diff -bu0 schemaorg-current-http.ttl schema-with-added-ontology.ttl > schema-add-ontology.diff
pip install pylode
time pylode -i schema-with-added-ontology.ttl -c true -o schema.html
@VladimirAlexiev
VladimirAlexiev / Berkshire-describe.ttl
Last active May 17, 2023 08:14
Instance diagram about Berkshire Hathaway GLEIF L1 data from #data_world DESCRIBE query, see https://twitter.com/valexiev1/status/1298655567389564928
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix fn: <http://www.w3.org/2005/xpath-functions#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix gleif-L1: <https://www.gleif.org/ontology/L1/> .
@prefix gleif-L2: <https://www.gleif.org/ontology/L2/> .
@prefix gleif-base: <https://www.gleif.org/ontology/Base/> .
@prefix gleif-data-L1: <https://linked.opendata.gleif.org/L1/> .
@prefix gleif-data-L2: <https://linked.opendata.gleif.org/L2/> .
@prefix gleif-data-ra: <https://linked.opendata.gleif.org/RegistrationAuthority/> .
@VladimirAlexiev
VladimirAlexiev / README.md
Last active January 9, 2020 10:29
RDF visualizations
@VladimirAlexiev
VladimirAlexiev / README.md
Created September 27, 2019 09:57
plantuml asciiArt

From the discussion https://forum.plantuml.net/4147, this is an example of a sequence diagram rendered as Unicode AsciiArt, limited to 78 chars, for embedding into an IETF RFC.

puml -tutxt sequence-asciiArt.puml

I can't believe how usable the ascii version is! See png version at https://i.imgur.com/zGFzsrI.png

{
"url": "@id",
"type": "@type",
"value": "@value",
"lang": "@language",
"data": "@graph",
"extensions" : "@nest",
"label": "http://www.w3.org/2000/01/rdf-schema#label"
}
@VladimirAlexiev
VladimirAlexiev / README.md
Created March 14, 2019 10:42
Science Classification

Science Classifications

This describes datasets for scientific topic classification. The list was developed as part of work on the project Tracking of Research Results for EC DG RTD.

Microsoft Academic Graph

MAG fields of study (FOS): developed using artificial intelligence and semantic understanding of content.

  • 229k FOS, organized in a non-mutually exclusive hierarchy with 19 top-level FOS.
@VladimirAlexiev
VladimirAlexiev / README.md
Last active August 30, 2018 22:21
Using jsonld normalize for SparqlScore Result Comparison

Using jsonld normalize for SparqlScore Result Comparison

Problem

RDF datasets can be serialized in many different forms, complicating comparison of test results. Many of the negative (partial/fail) results on http://sparqlscore.com can be improved if the comparator is more flexible. Several of the issues at https://github.com/BorderCloud/TFT-tests/issues are related to this problem.

Some examples of equivalences:

  • "foo" is the same as "foo"^^xsd:string
@VladimirAlexiev
VladimirAlexiev / permid-fix-url.pl
Created August 9, 2018 14:09
Thomson Reuters invalid URLs, and a script to fix them
#!perl -n
# zcat OpenPermID-bulk-organization-20180729_132845.ttl.gz | perl permid-fix-url.pl - | gzip - > organization.ttl.gz
# fix permid organization.ttl URLs to avoid: https://jira.ontotext.com/browse/GDB-2798
m{<https://\?\?} and next; # skip line with ????, pray and hope this won't break turtle
s{ # various malformed variants of http:
http://htpp:// |
http://http:// |
@VladimirAlexiev
VladimirAlexiev / grep-ref.sh
Created July 21, 2018 09:50
grep refs of a MITRE ATTACK wiki page in STIX: https://github.com/mitre/cti/issues/28
echo -e "\n$1"
grep -Fl "$1" */*.json