lu-pl / cortab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CorTab

CorTab - Script for corpusTable to RDF conversions.

Setup

Either use poetry or activate a virtual environment (Python >=3.10) and run the following commands:

git clone git@github.com:lu-pl/cortab.git
cd cortab/
pip install .

Usage

Either run cortab.py directly or use the CLI cortacl.

The CLI either transforms the entire corpusTable (if invoked without options) or creates a corpusTable partition by specifying a column and one or multiple rows and runs tabulardf rules defined in rules.py.

E.g.

cortacl --column 'id' --rows 14 16

creates a partition comprised of row 14 and 16 of the 'id' column (i.e. "SweDraCor" and "ReM") and runs the rdfdf conversion on that partition.

This is equivalent to:

cortacl --column 'corpusAcronym' --rows 'ReM' 'SweDraCor'

Also a --format flag is supported, default value is "ttl".

Example output

See example_output.ttl.

About


Languages

Language:Python 100.0%