Skip to content

Script: distinct values 2 symbol interps.pl

Timothy Lebo edited this page Feb 14, 2012 · 6 revisions
csv2rdf4lod-automation is licensed under the [Apache License, Version 2.0](/~https://github.com/timrdf/csv2rdf4lod-automation/wiki/License)

See conversion:interpret; see also Codebook enhancements.

Distinct-values-2-symbol-interps.pl queries a SPARQL endpoint for all distinct values of a predicate within a certain named graph and creates a fragment of the enhancement parameters needed to use csv2rdf4lod's Codebook enhancements.

$ distinct-values-2-symbol-interps.pl \
 --endpoint  http://localhost:2020/sparql \
 --graph     http://tw2.tw.rpi.edu/source/cordad-at-rpi-edu/dataset/eia/version/2010-Jul-14 \
 --predicate http://tw2.tw.rpi.edu/source/cordad-at-rpi-edu/dataset/eia/vocab/enhancement/1/primemover

     conv:interpret [
        conv:symbol         "ST";
        conv:interpretation "ST";
     ];
     conv:interpret [
        conv:symbol         "HY";
        conv:interpretation "HY";
     ];
     conv:interpret [
        conv:symbol         "IC";
        conv:interpretation "IC";
     ];
     conv:interpret [
        conv:symbol         "CT";
        conv:interpretation "CT";
     ];
     conv:interpret [
        conv:symbol         "CA";
        conv:interpretation "CA";
     ];
     conv:interpret [
        conv:symbol         "GT";
        conv:interpretation "GT";
     ];
     conv:interpret [
        conv:symbol         "CE";
        conv:interpretation "CE";
     ];
     conv:interpret [
        conv:symbol         "WT";
        conv:interpretation "WT";
     ];
     conv:interpret [
        conv:symbol         "CS";
        conv:interpretation "CS";
     ];
     conv:interpret [
        conv:symbol         "PS";
        conv:interpretation "PS";
     ];
     conv:interpret [
        conv:symbol         "PV";
        conv:interpretation "PV";
     ];
     conv:interpret [
        conv:symbol         "OT";
        conv:interpretation "OT";
     ];
     conv:interpret [
        conv:symbol         "FC";
        conv:interpretation "FC";
     ];
     conv:interpret [
        conv:symbol         "BT";
        conv:interpretation "BT";
     ];

Historical note

Clone this wiki locally