sweet icon indicating copy to clipboard operation
sweet copied to clipboard

Determine number of instances in SWEET

Open wdduncan opened this issue 5 years ago • 11 comments

I think would be useful to know how much instance level data each owl:Class in SWEET has. This could help in prioritizing/inform which classes to focus on, and what kinds of analysis would be most fruitful.

The spraql is straightforward:

select (count (distinct ?instance) as ?instance_count) ?class ?class_label
where 
{
  ?class a owl:Class .
  optional { ?class rdfs:label ?class_label } . # do all SWEET classes have labels?
  ?i a ?class .

  # sometimes the triple store creates blanks nodes you don't want
  # but I don't know if you gave your instanced IRIs or if you simply used blank nodes for them
  filter (!bnode(?i)) 
}

If you want to break out the counts by named graphs, you'll need to need to modify the sparql accordingly. E.g.:

graph ?g {
  ?class a owl:Class . optional { ?class rdfs:label ?class_label } . 
  ?i a ?class .
}

wdduncan avatar Jul 24 '20 17:07 wdduncan

@wdduncan can you post a sample result? I would have through you would have been interested in owl:NamedIndividual's instead of owl:Classes here?

lewismc avatar Jul 25 '20 18:07 lewismc

@lewismc What is the URL of your SPARQL endpoint?

wdduncan avatar Jul 25 '20 18:07 wdduncan

@wdduncan http://cor.esipfed.org/ont/sparql

lewismc avatar Jul 25 '20 18:07 lewismc

Here's an example result

Looks you have a lot of dams :)

wdduncan avatar Jul 25 '20 20:07 wdduncan

Here's an example result

Nice query, when we update YASGUI I'll make this query one of the examples.

Looks you have a lot of dams :)

Yes that is a pretty rich dataset and can be visualized nicely through YASGUI's Geo feature.

As we discussed offline, the owl:NamedIndividual's are scattered throughout the ontology suite. The query above has highlighted the extent... which is great.

I think that there may be enough interest to pursue an investigation of the 98 owl:NamedInvidual's associated with http://sweetontology.net/stateTime/Age however we would need to define what it is that we are interested in delivering. Is the goal here to see what SWEET owl:NamedInvidual's compliment/harmonize with another resource? Like ENVO?

lewismc avatar Jul 25 '20 21:07 lewismc

EnvO doesn't have terms for expressing geologic age ... perhaps this could be an area of collaboration that would benefit EnvO.
My main thought was to enrich SWEET by using EnvO semantics to facilitate searching for instances (owl:NamedIndividuals). E.g., find me all samples (instances / owl:NamedIndividuals) that have part some methane and located in some aquatic ecosystem.

Make sense?

wdduncan avatar Jul 27 '20 17:07 wdduncan

EnvO doesn't have terms for expressing geologic age ... perhaps this could be an area of collaboration that would benefit EnvO. My main thought was to enrich SWEET by using EnvO semantics to facilitate searching for instances (owl:NamedIndividuals). E.g., find me all samples (instances / owl:NamedIndividuals) that have part some methane and located in some aquatic ecosystem.

Make sense?

We would not want to commit to or impose the semantics, and associated ontological commitments or semantic resources, of another resource (EnvO or otherwise) on SWEET.

rrovetto avatar Jul 27 '20 19:07 rrovetto

As far I can tell SWEET doesn't have strong semantics. In any case, you can classify individuals multiple ways. The goal is to enrich semantic search. You can do this with SKOS matches if you dislike the OWL.

wdduncan avatar Jul 27 '20 20:07 wdduncan

@rrovetto

We would not want to commit to or impose the semantics, and associated ontological commitments or semantic resources, of another resource (EnvO or otherwise) on SWEET.

Why not? If axiom's are lacking in SWEET then wehy wouldn't we wish to use external source to enrich it? The same goes for ENVO. This is exactly what the semantic harmonization community have been working on all this time.

As far I can tell SWEET doesn't have strong semantics.

Correct.

The goal is to enrich semantic search.

Correct.

lewismc avatar Jul 27 '20 20:07 lewismc

On the EnvO slack channel (anyone a part of this?) the suggestion was made to map (e.g., skos:closematch) geologic ages to the wikidata IRIs. I'm not familiar enough with wikidata to know if this is viable, but thought I'd pass along the suggestion.

wdduncan avatar Jul 27 '20 21:07 wdduncan

EnvO doesn't have terms for expressing geologic age

On this topic, please be aware that we have been maintaining RDF datasets for the Geologic TImescale, covering the various versions issued by the International Commission on Stratigraphy here: https://github.com/CGI-IUGS/timescale-data

This representation uses an ontology documents here: https://github.com/CGI-IUGS/timescale-ont

dr-shorthair avatar Jul 27 '20 21:07 dr-shorthair