Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: de-duplicate OWL unions #518

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix: de-duplicate OWL unions #518

wants to merge 1 commit into from

Conversation

tpluscode
Copy link

@tpluscode tpluscode commented Jul 13, 2021

This combines all occurrences of owl:unionOf blank node types which are used more than once.

Why? Consider the data below with reasoning enabled. How many types will <foo> have?

<Activity1> as:object <foo> .
<Activity2> as:origin <foo> .
<Activity3> as:target <foo> .
<Activity4> as:actor  <foo> .
<Activity5> as:author <foo> .

Because the same union is a distinct blank node rdfs:range of each of those properties, it will have 5 types, and additional for every usage with another property sharing that same ( as:Link as:Object ) union. Something like

<foo> a [
  a owl:Class ;
  owl:unionOf ( as:Object as:Link ) ;
], [
  a owl:Class ;
  owl:unionOf ( as:Object as:Link ) ;
], [
  a owl:Class ;
  owl:unionOf ( as:Object as:Link ) ;
], [
  a owl:Class ;
  owl:unionOf ( as:Object as:Link ) ;
], [
  a owl:Class ;
  owl:unionOf ( as:Object as:Link ) ;
] .

Clearly, this is not desired. By collapsing all this ranges into a single blank node, there will only be one such inferred type triple

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant