Skip to content

Question: How does Concept visualizer treat polyhierarchies? #55

Description

@jindrichmynarz

When you have a poly-hierarchical skos:ConceptScheme (i.e. a concept can have more than 1 broader concept), then it seems that the Concept visualizer duplicates the hierarchy's branches for each concept with multiple broader concepts. For example, I have a poly-hierarchical code list of pension kinds, which is visualized in this way:

pension_kinds_2008_used_in_data

For instance, in this concept scheme "Vdovské důchody vyplácené v souběhu s přímým důchodem" has multiple broader concepts, so its branch is duplicated.

Since poly-hierarchical concept schemes cannot be coerced into a tree with single root, it is not possible to visualize them easily. I think it would be acceptable if LP-VIS shows an error if provided with a poly-hierarchical skos:ConceptScheme.

Testing if data contains polyhierarchies can be done using this SPARQL query:

PREFIX skos:     <http://www.w3.org/2004/02/skos/core#>

ASK
WHERE {
  {
    SELECT ?narrower 
    WHERE {
      {
        ?broader skos:narrower|skos:narrowerTransitive ?narrower .
      } UNION {
        ?narrower skos:broader|skos:broaderTransitive ?broader .
      }
    }
    GROUP BY ?narrower 
    HAVING (COUNT(DISTINCT ?broader) > 1)
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions