timrdf / csv2rdf4lod-automation

Shell script automation to support csv2rdf4lod converter
https://github.com/timrdf/csv2rdf4lod-automation/wiki
Apache License 2.0
109 stars 36 forks source link

subproperty not appearing #149

Open timrdf opened 13 years ago

timrdf commented 13 years ago

I met a problem when converting some dataset. I attached the related files for you to review:

data.medicare.gov.csv: the data file data.medicare.gov.csv.e1.params.ttl: the enhancement profile data.medicare.gov.csv.e1.ttl: the conversion result data.medicare.gov.csv.raw.ttl: conversion without enhancement

The problem is for the column 16 "Data Provided By". I want to enhance it as "agency" and using the following enhance statement:

conversion:enhance [
        ov:csvCol          16;
        ov:csvHeader       "Data Provided By";
        #conversion:label   "Data Provided By";
        conversion:comment "";

        conversion:range  rdfs:Resource;
        conversion:subproperty_of dgtwc:agency ;    #dataset catalog addition
        conversion:subproperty_of dcterms:contributor;

        conversion:interpret [
           conversion:symbol        "";
           conversion:interpretation conversion:null;
        ];
        conversion:interpret [
           conversion:symbol "(none)";
           conversion:interpretation conversion:null;
        ];
     ];

However, in the result file "data.medicare.gov.csv.e1.ttl", there is no such property "dgtwc:agency", and even the original property "Data Provided By" does not exist anymore.

I checked the "data.medicare.gov.csv.raw.ttl", the original property "Data Provided By" is there.

I checked the "data.medicare.gov.csv", there are only two possible values for "Data Provided By": "" and "(none)". These two values will be converted to conversion:null. I should expect the statement such as "dgtwc:agency conversion:null ;" in the "data.medicare.gov.csv.e1.ttl", is it right?

Given that the property "dgtwc:agency" is not there, the demo has some problem on this dataset.

timrdf commented 13 years ago

added https://scm.escience.rpi.edu/svn/public/logd-csv2rdf4lod/data/source/data-medicare-gov/catalog/rq/test/ask/present/twc-agency-subproperty.rq

bash-3.2$ cr-test-conversion.sh 
../../rq/test/ask/absent/impossible.rq Ask => No
../../rq/test/ask/present/twc-agency-subproperty.rq Ask => No
--------------------------------------------------------------------------------
1 of 2 passed
timrdf commented 13 years ago
bash-3.2$ cr-test-conversion.sh -v
................................................................................
../../rq/test/ask/absent/impossible.rq (Ask => No)

      twi:TimLebo owl:sameAs twi:notTimLebo .

-\-!-*-!-!-!-*-!-*-!-!-!-*-!-*-!-!-!-*-!-*-!-!-!-*-!-*-!-!-!-*-!-*-!-!-!-*-!-!-/   - - - FAIL - - -
../../rq/test/ask/present/twc-agency-subproperty.rq (Ask => No)

      ?dataset dgtwc:agency ?agency .

--------------------------------------------------------------------------------
1 of 2 passed
timrdf commented 13 years ago

Testing infrastructure should be used https://github.com/timrdf/csv2rdf4lod-automation/wiki/Script:-cr-test-conversion.sh