Saving and loading a parser

Published

June 7, 2024

When we export analyses to CEX format, we want to use full CITE2 URNs, rather than the abbreviated URNs of the Analysis structure. You need a dictionary mapping collection names to full CITE2 URN values for the collection.

registry = Dict(
        "gburglex" => "urn:cite2:citedemo:gburglex.v1:",
        "gburgform" => "urn:cite2:citedemo:gburgform.v1:",
        "gburgrule" => "urn:cite2:citedemo:gburgrule.v1:",
        "gburgstem" => "urn:cite2:citedemo:gburgstem.v1:"
    )
length(registry)
4

Use the cex function (from CitableBase) to format your analyzes as delimited text. To expand abbreviated URNs to full CTS and CITE2 URNs while formatting as deliimted text, use the delimited function. You can use normal Julia IO to write the results to a file, for example.

Broken

THis section needs updating

cex_output = delimited(psg_analysis, registry = registry)
open("outfile.cex", "w") do io
    write(io, cex_output)
end