Package: cow-csvw
CoW: Integrated CSV to RDF ConverterCoW (Csv on the Web) is an integrated CSV to RDF converter that uses the W3C standardCSVWfor rich semantic table specificatons, andnanopublicationsas an output RDF modelWhat is CoWCoW is a command-line utility to convert any CSV file into an RDF dataset. Its distinctive features are:Expressive CSVW-compatible schemas based on theJinjatemplate engingeHighly efficient implementation leveraging multithreaded and multicore architecturesAvailable as a pythonicCLI tool,library, andweb serviceSupports Python 3Documentation and supportFor user documentation see the basic introduction videohttps://t.co/SDWC3NhWZfandwiki. Technical details are provided below. If you encounter an issue then pleasereportit. Also feel free to create pull requests!Install (requires Python to be installed)pip3is the recommended method of installing COW in your system:pip3 install cow-csvwYou can upgrade your currently installed version with:pip3 install cow-csvw --upgradePossible issues:Permission issues. You can get around them by installing CoW in user space:pip3 install cow-csvw --user. Make sure your binary user directory (typically something like/Users/user/Library/Python/3.7/binin MacOS or/home/user/.local/binin Linux) is in your PATH (in MacOS:/etc/paths. For Windows/MacOS we recommend to install Python via theofficial distribution page. You can also usevirtualenvto avoid conflicts with your system librariesPleasereport your unlisted issueIf you can't/don't want to deal with installing CoW, you can use thecattleweb service version(deprecated).UsageCLIThe CLI (command line interface) is the recommended way of using CoW for most users. The straightforward CSV to RDF conversion is done in two steps. First:cow_tool build myfile.csvThis will create a file namedmyfile.csv-metadata.json(from now on: JSON schema file or just JSF). You don't need to worry about this file if you only want a syntactic conversion. Then:cow_tool convert myfile.csvWill output amyfile.csv.nqRDF file (nquads by default; you can control the output RDF serialization with e.g.--format turtle). That's it!If you want to control the base URI namespace, URIs used in predicates, virtual columns, and the many other features of CoW, you'll need to edit themyfile.csv-metadata.jsonJSF and/or use CoW arguments. Have a look at theCLI optionsbelow, the examples in thewiki, and thetechnical documentation.OptionsCheck the--helpfor a complete list of options:usage: cow_tool [-h] [--dataset DATASET] [--delimiter DELIMITER]
                [--quotechar QUOTECHAR] [--encoding ENCODING] [--processes PROCESSES]
                [--chunksize CHUNKSIZE] [--base BASE]
                [--format [{xml,n3,turtle,nt,pretty-xml,trix,trig,nquads}]]
				[--gzip] [--version]
                {convert,build} file [file ...]

Not nearly CSVW compliant schema builder and RDF converter

positional arguments:
  {convert,build}       Use the schema of the `file` specified to convert it
                        to RDF, or build a schema from scratch.
  file                  Path(s) of the file(s) that should be used for
                        building or converting. Must be a CSV file.

optional arguments:
  -h, --help            show this help message and exit
  --dataset DATASET     A short name (slug) for the name of the dataset (will
                        use input file name if not specified)
  --delimiter DELIMITER
                        The delimiter used in the CSV file(s)
  --quotechar QUOTECHAR
                        The character used as quotation character in the CSV
                        file(s)
  --encoding ENCODING   The character encoding used in the CSV file(s)

  --processes PROCESSES
                        The number of processes the converter should use
  --chunksize CHUNKSIZE
                        The number of rows processed at each time
  --base BASE           The base for URIs generated with the schema (only
                        relevant when `build`ing a schema)
  --gzip 				Compress the output file using gzip
  --format [{xml,n3,turtle,nt,pretty-xml,trix,trig,nquads}], -f [{xml,n3,turtle,nt,pretty-xml,trix,trig,nquads}]
                        RDF serialization format
  --version             show program's version number and exitWeb serviceThere is web service and interface running CoW, calledcattle. Two public instances are running at:http://cattle.datalegend.net/- runs CoW in Python3http://legacy.cattle.datalegend.net/- runs CoW in Python2 for legacy reasonsBeware of the web service limitations:There's a limit to the size of the CSVs you can uploadIt's a public instance, so your conversion could take longerCattle is no longer being maintained and these public instances will eventually be taken offlineLibraryOnce installed, CoW can be used as a library as follows:from cow_csvw.csvw_tool import COW
import os

COW(mode='build', files=[os.path.join(path, filename)], dataset='My dataset', delimiter=';', quotechar='\"')

COW(mode='convert', files=[os.path.join(path, filename)], dataset='My dataset', delimiter=';', quotechar='\"', processes=4, chunksize=100, base='http://example.org/my-dataset', format='turtle', gzipped=False)Technical documentationTechnical documentation for CoW are maintained in this GitHub repository (under ), and published throughRead the Docsathttp://csvw-converter.readthedocs.io/en/latest/.To build the documentation from source, change into thedocsdirectory, and runmake html. This should produce an HTML version of the documentation in the_build/htmldirectory.ExamplesThewikiprovides more hands-on examples of transposing CSVs into Linked DataLicenseMIT License (seelicense.txt)AcknowledgementsAuthors:Albert Meroño-Peñuela, Roderick van der Weerdt, Rinke Hoekstra, Kathrin Dentler, Auke Rijpma, Richard Zijdeman, Melvin Roest, Xander WilckeCopyright:Vrije Universiteit Amsterdam, Utrecht University, International Institute of Social HistoryCoW is developed and maintained by the CLARIAH project and funded by NWO.