Skip to content

Instantly share code, notes, and snippets.

View VladimirAlexiev's full-sized avatar

Vladimir Alexiev VladimirAlexiev

View GitHub Profile
@VladimirAlexiev
VladimirAlexiev / prefixes.txt
Created March 29, 2018 08:58
Ambiguous prefixes in FIBO 2017-05
./etc/testing/data/fnd/Accounting/TestAccountingEquity.ttl : <http://www.omg.org/spec/EDMC-FIBO/FND/Accounting/TestAccountingEquity/> .
./etc/testing/data/fnd/Accounting/TestCurrencyAmount.ttl : <http://www.omg.org/spec/EDMC-FIBO/FND/Accounting/TestCurrencyAmount/> .
./etc/testing/data/fnd/AgentsAndPeople/TestAgents.ttl : <http://www.omg.org/spec/EDMC-FIBO/FND/AgentsAndPeople/TestAgents/> .
./etc/testing/data/fnd/AgentsAndPeople/TestPeople.ttl : <http://www.omg.org/spec/EDMC-FIBO/FND/AgentsAndPeople/TestPeople/> .
./etc/testing/data/fnd/Agreements/TestAgreements.ttl : <http://www.omg.org/spec/EDMC-FIBO/FND/Agreements/TestAgreements/> .
./etc/testing/data/fnd/Agreements/TestContracts.ttl : <http://www.omg.org/spec/EDMC-FIBO/FND/Agreements/TestContracts/> .
./etc/testing/data/fnd/GoalsAndObjectives/TestGoals.ttl : <http://www.omg.org/spec/EDMC-FIBO/FND/GoalsAndObjectives/Te
@VladimirAlexiev
VladimirAlexiev / .block
Created October 11, 2017 15:18 — forked from mbostock/.block
Radial Dendrogram
license: gpl-3.0
border: no
height: 900
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix schema: <http://schema.org/> .
@prefix grddl: <http://www.w3.org/2003/g/data-view#> .
@prefix gldp: <http://www.w3.org/ns/people#> .
@prefix wdr: <http://www.w3.org/2007/05/powder#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xhv: <http://www.w3.org/1999/xhtml/vocab#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@VladimirAlexiev
VladimirAlexiev / tooltips.svg
Created August 30, 2017 17:02
plantuml SVG diagram with colors, icons, tooltips
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

How Not to Do Open Publications LOD

http://lod.openaire.eu/vocab is buggy as hell.

  1. Mentions classes Publication , Dataset , FundingStream that have no definition
  2. Strange local mappings, e.g. class DataSource that is mapped to prov:Entity without any description or explanation of this mapping; foaf:lastName is given local label "Secondnames"
  3. Reuses and redefines external properties e.g. like http://purl.org/cerif/frapo/hasCallIdentifier without reproducing the description e.g. "A data property specifying the identifying number of a call for applications issued by a funding agency."
  4. Many recursive links rdfs:isDefinedBy
  5. Dumbs-down CERIF links to direct properties (e.g. http://lod.openaire.eu/vocab/funder) instead of using flexible links (eg the Proj_Org class)
  6. Strange labels such as Openairecompatibility, oamanDatePublications.
0
1
10
1001
1003
1004
1005
1006
1008
101
@VladimirAlexiev
VladimirAlexiev / README.md
Created March 30, 2017 06:54
How to use Google Sheets to Manage Wikidata Coreferencing

How to use Google Sheets to Manage Wikidata Coreferencing

A previous post How to Add Museum IDs to Wikidata explained how to use SPARQL to find missing data on Wikidata (Getty Museum IDs), how to create such values (from museum webpage URLs) and how to format them properly for QuickStatements.

Here I explain how to use Google sheets to manage a more advanced task. The sheet AAT-Wikidata matches about 3k AAT concepts to Wikipedia, WordNet30 and BabelNet (it restored an old mapping to Wordnet, retrieved it from BabelNet, mapped to Wikipedia).

  • For each row, it uses the following Google sheet formula (column C) to query the Wikipedia API and get the corresponding Wikidata ID (wikibase_item); split on two lines for readability:
=ImportXml(concat("https://en.wikipedia.o
@VladimirAlexiev
VladimirAlexiev / README.md
Created March 27, 2017 17:51
org-mode and dokieli / linked-research?

Linked Research is a movement to publish articles in HTML, with embedded semantic data that would allow not just citations but much deeper interactions. Sarven Capadisli is at the forefront of this, and people like Tim Berners-Lee and Soren Auer support it fully. I believe this is the future of scholarly publishing.

  • see http://csarven.ca/archives/articles for relevant articles
  • https://dokie.li is a template and a set of CSS that produces native HTML, LNCS and ACM styles. It also includes nice interactive tools (eg comments, citations, Sparklines) but is not yet a fully-fledge editor

The best way to write research articles is, of course, plain text.

@VladimirAlexiev
VladimirAlexiev / count.sh
Created March 17, 2017 12:54
counting schema.org
perl -ne '($x) = m{ a ([:\w]+) ?;$} and \
$x !~ m{schema:} || $x eq "schema:Organization" || ($x="Lookup") and \
print "$x\n"' \
schema.org-20170205-all-layers.ttl | sort | uniq -c | sort -nr
1101 rdf:Property
715 rdfs:Class
246 Lookup
13 schema:Organization
@VladimirAlexiev
VladimirAlexiev / get.sh
Created March 16, 2017 06:30
Statistics about ULAN coreferencing on Mix-n-Match
curl -q 'https://tools.wmflabs.org/mix-n-match/api.php?query=download&catalog=27' > ulan.tsv
cut -d $'\t' -f5 ULAN.tsv | sort | uniq -c | sort -rn