Open labra opened 6 years ago
I just want to express my support for this feature addition. I think it's what we need in the OBO ShEx file to state that a term should not have a synonym the same as its label, but I think our requirement would be a negation of this (we basically want disjoint properties). For example:
# Should fail because GO:1234 has the same text as a label and as exact synonym
GO:1234 rdfs:label "nucleus" .
GO:1234 oboInOwl:hasExactSynonym "nucleus" .
Currently we're using SPARQL like this to query for these issues:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX oboInOwl: <http://www.geneontology.org/formats/oboInOwl#>
SELECT ?c ?oneSynonym ?anotherSynonym ?syn
WHERE {
VALUES ?oneSynonym {
rdfs:label
oboInOwl:hasSynonym
oboInOwl:hasExactSynonym
oboInOwl:hasNarrowSynonym
oboInOwl:hasBroadSynonym
oboInOwl:hasRelatedSynonym
}
VALUES ?anotherSynonym {
rdfs:label
oboInOwl:hasSynonym
oboInOwl:hasExactSynonym
oboInOwl:hasNarrowSynonym
oboInOwl:hasBroadSynonym
oboInOwl:hasRelatedSynonym
}
?c ?oneSynonym ?syn .
?c ?anotherSynonym ?syn .
FILTER NOT EXISTS {
?c owl:deprecated true .
}
FILTER (STR(?anotherSynonym) < STR(?oneSynonym))
}
This issue wants to express a recursive model where the values refer to themselves.
The example is between a person that owns a dog and a dog that likes a person, but the condition is that the value owned by a person must like that person.
To express that condition, I think we need to solve this issue before to be able to compare values.
A possible syntax could be:
in this way the following example: