diff --git a/README.md b/README.md index ab1efc1..82ad253 100644 --- a/README.md +++ b/README.md @@ -491,6 +491,47 @@ print(extract_begin_end(date_object)) # ('1800', '1900-12-12') ``` +### Convert a TEI document into an RDF graph representing a CIDOC CRM F24 Publication Expression. + +```python +from acdh_cidoc_pyutils import teidoc_as_f24_publication_expression + +file_path = "L02643.xml" +domain = "https://schnitzler-briefe.acdh.oeaw.ac.at" + +uri, g, mentions = teidoc_as_f24_publication_expression( + file_path, domain, ".//tei:titleStmt/tei:title[@level='a']" +) +g.serialize(file_name.replace(".xml", ".ttl")) +``` +returns +```ttl +@prefix ns1: . +@prefix rdfs: . + + a ; + rdfs:label "Paul Goldmann an Arthur Schnitzler, 6. 8. 1889"@de ; + ns1:P1_is_identified_by ; + ns1:P67_refers_to , + , + , + , + , + , + , + , + , + , + . + + a ns1:E55_Type ; + rdfs:label "A TEI/XML encoded text"@en . + + a ns1:E33_E41_Linguistic_Appellation ; + rdfs:label "Paul Goldmann an Arthur Schnitzler, 6. 8. 1889"@de ; + ns1:P2_has_type . +``` + ## development * `pip install -r requirements_dev.txt` diff --git a/setup.py b/setup.py index 0b56910..c03a7be 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,6 @@ test_suite="tests", tests_require=[], url="https://github.com/acdh-oeaw/acdh-cidoc-pyutils", - version="1.5", + version="1.6", zip_safe=False, )