(DCTap → ShEx) Convert a CSV file in DCTap to a ShEx schema - rudof-project/rudof GitHub Wiki
(DCTap → ShEx) Convert a CSV file in DCTap to a ShEx schema
It is possible to convert a DCTap file in CSV to ShEx.
For example, the user.csv file in examples/user.csv can be converted to a ShEx schema running:
rudof convert -m dctap -s examples/user.csv -f csv -x shex
The converter contains a parameter that can be used to add configuration information.
For example, instead of the basic prefix map, we can use custom prefix map declarations as follows.
rudof convert -s examples/dctap/book.csv -m dctap -x shex -f csv -c examples/dctap/book_converter_config.yml
Where the contents of book_converter_config.yml are:
tap2shex:
base_iri: "http://example.org/"
prefixmap:
dct: "http://purl.org/dc/terms/"
rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
foaf: "http://xmlns.com/foaf/0.1/"
xsd: "http://www.w3.org/2001/XMLSchema#"
sdo: "https://schema.org/"
ex: "http://example.org/"