VladimirAlexiev / soml

Semantic Objects Modeling Language
8 stars 2 forks source link

Non-deterministic generation in tsv2owl #9

Open SCVFlare opened 10 months ago

SCVFlare commented 10 months ago

Each generation of the owl form tsv2owl is unique. Even though the .tsv stays unchanged properties in owl restrictions get jumbled in a random order each generation. The following link showcases two generations side by side using the same .tsv: https://www.diffchecker.com/WXWT2Dek/

VladimirAlexiev commented 10 months ago

hi @SCVFlare ! As far as I can see, the diffs concern he order of blank nodes like this, right?

        rdfs:subClassOf   [ rdf:type            owl:Restriction ;
                            owl:maxCardinality  1 ;
                            owl:onProperty      s:creativeWorkStatus
                          ] ;

Here is the process:

At the level of paragraphs, this is deterministic. But inside a paragraph, riot can change the order of Restrictions because every time it runs, it allocates new blank node IDs, and I guess it sorts Restrictions by that. We have no control over this riot behavior.

For reproducibility, it's best to just use otkg-unformatted.ttl. It's ugly but predictable.