thegetty / crom

Python library to make creation of CIDOC CRM easier by mapping classes/predicates to python objects
Apache License 2.0
49 stars 16 forks source link

crm_vocab extension #28

Closed KarlPineau closed 6 years ago

KarlPineau commented 6 years ago

Hi :)

I've started to use Crom, really great tool 👍

I would like to extend it in order to be able to manage CRMinf. I've started to edit crm_vocab.tsv but I've few questions about it:

Thanks a lot! Karl

azaroth42 commented 6 years ago

You can't add classes without a superclass, they need to be at least E1s. E59 Primitive Value (and other values) don't map into RDF at all, they become literals.

Instead of tweaking the TSV directly, you could look at the code in utils/. It processes the RDF/XML ontologies in utils/data/ ... it shouldn't be too hard to add CRMInf (or other extensions).

KOH is Key Order Hash (or KOI for key order integer) -- In which order do you want the keys to appear in the JSON. It's only useful for documentation and making human readable output, rather than output intended for machine use only.

okay is whether to allow the property to be used. 0 is don't use it, 1 is allow it, and 2 is allow it but warn that it's not good to use.

The inverse properties from the ontology files in utils/data/. I wrote a script (make_inverses.py) to generate inverses.xml which then adds the inverse relationships to the rdfs ontology.

azaroth42 commented 6 years ago

(As this isn't an actual issue, the response above closes it :) )

KarlPineau commented 6 years ago

Hi, Thanks for those explanations. I succeeded to integrate CRMinf, now I'm starting to integrate FRBRoo. I will look at utils/ for this one. Thanks!