Re: [shex] Support for circular references that compare their values (#85)

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:

```turtle
# 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:

```sparql
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))
}
```

-- 
GitHub Notification of comment by balhoff
Please view or discuss this issue at https://github.com/shexSpec/shex/issues/85#issuecomment-605447948 using your GitHub account

Received on Saturday, 28 March 2020 13:32:51 UTC