-
Notifications
You must be signed in to change notification settings - Fork 36
conversion:SubjectAnnotation
timrdf edited this page Jul 13, 2012
·
18 revisions
csv2rdf4lod-automation is licensed under the [Apache License, Version 2.0](https://github.com/timrdf/csv2rdf4lod-automation/wiki/License)
see conversion:predicate.
Input:
Alabama,Tobacco Price/Tax/Funding,Government,1991,State excise tax per pack,0.17,US Dollars,1990,1991
Alabama,Tobacco Price/Tax/Funding,Government,1991,Total cigarette tax per pack,0.345,US Dollars,1990,1991
Enhancement parameters:
<http://logd.tw.rpi.edu/source/twc-rpi-edu/dataset/iogds-upstream/version/2012-Jan-07/conversion/enhancement/1>
a conversion:LayerDataset, void:Dataset;
...
conversion:conversion_process [
a conversion:EnhancementConversionProcess;
conversion:enhancement_identifier "1";
...
conversion:enhance [
a conversion:SubjectAnnotation;
conversion:predicate dcterms:description;
conversion:object "This is an awesome description!";
];
The output will have a dcterms:description on each subject:
:thing_2
dcterms:isReferencedBy <http://logd.tw.rpi.edu/source/lebot/dataset/templated-subject-annotations/version/2012-Jul-12> ;
void:inDataset <http://logd.tw.rpi.edu/source/lebot/dataset/templated-subject-annotations/version/2012-Jul-12> ;
dcterms:description "This is an awesome description!" ;
e1:state "Alabama" ;
e1:category value_of_category:Tobacco_Price_Tax_Funding ;
e1:entity "Government" ;
e1:start_year "1991" ;
e1:measure "State excise tax per pack" ;
e1:value "0.17" ;
e1:unit "US Dollars" ;
e1:succeeds "1990" ;
e1:end_year "1991" ;
ov:csvRow "2"^^xsd:integer .
...
:thing_3
dcterms:description "This is an awesome description!" ;
...
:thing_4
dcterms:description "This is an awesome description!" ;
The object string can include a [template](Using template variables to construct new values):
conversion:enhance [
a conversion:SubjectAnnotation;
conversion:predicate dcterms:description;
conversion:object "I love the great state of [#1]!";
];
that will include a cell value in the annotation:
:thing_2
dcterms:description "I love the great state of Alabama!" ;
If the object looks like a URI, it'll become one:
conversion:enhance [
a conversion:SubjectAnnotation;
conversion:predicate dcterms:description;
conversion:object "http://dbpedia.org/resource/[#1]";
];
@prefix dbpedia: <http://dbpedia.org/resource/> .
:thing_2
dcterms:description dbpedia:Alabama ;
TODO:
conversion:enhance [
a conversion:SubjectAnnotation;
conversion:predicate "description";
conversion:object "http://dbpedia.org/resource/[#1]";
];
Multiple objects is fine, too:
conversion:enhance [
a conversion:SubjectAnnotation;
conversion:predicate dcterms:description;
conversion:object "http://dbpedia.org/resource/[#1]",
"[#4] was a great year.";
];
:thing_2
dcterms:description "1991 was a great year." , dbpedia:Alabama ;
conversion:enhance [
a conversion:SubjectAnnotation;
conversion:predicate "[#5]";
conversion:object "[#6]";
];
:thing_2
e1:state_excise_tax_per_pack "0.17" ;
conversion:enhance [
a conversion:SubjectAnnotation;
conversion:predicate "[#5]";
conversion:object "xsd:decimal([#6])";
];
:thing_3
e1:total_cigarette_tax_per_pack "0.17"^^xsd:decimal ;
Used to be (but was deprecated and replaced; no longer works):
ov:csvCol 0;
conversion:predicate "p";
conversion:object "o"
- conversion:Enhancement.
- created to resolve issue 82