Skip to content

SHACL Inference Rules - Use Case: consistent language tag handling for SKOS labels #298

Open
@robert-david

Description

@robert-david

SKOS concepts use labels as a textual representation. These labels can be used for concept annotations in documents, where they are textually matched to terms in the text. In this use case, it is important to have a clear definition of languages and every label should define the language as a tag so that it is only matched in documents of the same language. If a label has no tag, it can be added (inferred) based on a default language, which can be defined for a specific use case.

Data graph:

@prefix ex: <http://example.com/ns#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .

ex:concept1 a skos:Concept ;
    skos:prefLabel "animals" ;
    skos:altLabel "fauna"@en .

Shapes graph:

@prefix ex: <http://example.com/ns#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .

ex:ConceptShape a sh:NodeShape ;
    sh:targetClass skos:Concept ;
    sh:property [
        sh:path skos:prefLabel ;
        sh:languageIn ( "en" ) ;
    ] .

Metadata

Metadata

Assignees

No one assigned

    Labels

    InferencingFor SHACL 1.2 Inferencing spec.UCRUse Cases and Requirements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions