Description
❓ What is the proper way to construct literal predicate chains from an ontology?
I am attempting to create embeddings for an ontology.
I looked through the issues to see if this was answered and maybe I overlooked something but i'm a little confused as to how to construct the predicate chains properly using the mutag example as a reference.
Here is an exerpt from the provided rdflib example where the literal predicate chains are being defined. I noticed that inBond's range is not a literal and that introduced some confusion as to how to construct them correctly from an ontology.
# "samples/mutag/mutag.owl",
skip_predicates={"http://dl-learner.org/carcinogenesis#isMutagenic"}
literals=[
[
"http://dl-learner.org/carcinogenesis#hasBond", # domain: Compound , range: Bond
"http://dl-learner.org/carcinogenesis#inBond", # domain: Bond, range: Atom <-- this is not a literal? I'm confused?
],
[
"http://dl-learner.org/carcinogenesis#hasAtom", # domain: Compound, range: Atom
"http://dl-learner.org/carcinogenesis#charge", # domain: Atom, range: xsd:double
],
],
Is there any documentation/guidance on how to construct these? Where do I begin the walk of the properties (building the chain) down to the eventual properties whose range is a xsd:primitive?
Does this mean that there could be more than two items in each literal predicate chain entry, as in:
literals=[
[
"http://example.com#prop1", # domain: ClassA, range: ClassB
"http://example.com#prop2", # domain: ClassB, range: ClassC
"http://example.com#prop3", # domain: ClassC, range: xsd:string
],
]
I have a rather large ontology and I want to make sure I am doing it correctly. Any help is greatly appreciated!!