GSAS - A numeric and perception-aware approach to SKOS mapping relations
This repository provides a reproducible, ontology-driven framework for modelling graded semantic alignment in SKOS using numeric degrees of connection.
It combines three complementary layers:
- Minimal SKOS mapping degrees (
exactMatch,closeMatch,relatedMatch) - 4-level SKOS mapping refinement (
high,medium,low,dubious) - 7-star SKOS mapping refinement (methodological layer)
- Empirical perceptions of probability (language-based, empirical layer)
All layers are published as property-only RDF (TBox), are fully mergeable into a single ontology, and are accompanied by CSV tables and plots for transparency and reproducibility.
This repository is intended to be cited together with a working paper that explains the modelling decisions, mathematical background, and empirical basis of the approach.
fuzzy-wobbly-semantic-alignment/
│
├─ ontology/
│ ├─ create_ontology.py
│ └─ merged_ontology.ttl
│
├─ skos/
│ ├─ skos.py
│ ├─ skos_minimal_degrees.ttl
│ ├─ skos_minimal_degrees.csv
│ └─ skos_minimal_degree_plot.jpg
│
├─ skos_4level/
│ ├─ skos_4level.py
│ ├─ skos_4level_mapping.ttl
│ ├─ skos_4level_degrees.csv
│ └─ skos_4level_degree_plot.jpg
│
├─ skos_7star/
│ ├─ skos_7star.py
│ ├─ probly.csv
│ ├─ skos_7star_mapping.ttl
│ ├─ skos_7star_degrees.csv
│ └─ skos_7star_degree_plot.jpg
│
├─ skos_perceptions/
│ ├─ skos_perceptions.py
│ ├─ probly.csv
│ ├─ skos_perceptions_mapping.ttl
│ ├─ skos_perceptions_stats.csv
│ └─ skos_perceptions_degree_plot.jpg
│
├─ .gitignore
└─ README.md
Across all scripts and outputs, the following principles apply:
-
SKOS-first modelling
skos:relatedMatch,skos:closeMatch, andskos:exactMatchform the stable semantic backbone. -
Property-only RDF (TBox)
No individuals are created. All modelling is done usingowl:ObjectPropertyandowl:AnnotationProperty. -
Single custom namespace
All extensions use: https://w3id.org/skos-plus/ ensuring stable, consistent URIs across all layers. -
Numeric justification
Each mapping relation is annotated with a numericskosplus:degreeOfConnectionin the range[0,1]. -
Reproducibility & transparency
Every RDF file is accompanied by: -
a CSV table with numeric values
-
a plot visualising the mapping logic
This script defines a baseline numeric interpretation of SKOS mapping relations without any 7-star or perception-based logic.
It answers the question:
How can
skos:exactMatch,skos:closeMatch, andskos:relatedMatchbe grounded in numeric degrees of connection?
- Assigns a numeric degree of connection to:
skos:exactMatchskos:closeMatchskos:relatedMatch- Uses a simple, monotonic mapping in the range
[0,1] - Produces RDF, CSV, and a plot
skos_minimal_degrees.ttlskos_minimal_degrees.csvskos_minimal_degree_plot.jpg
This layer acts as the semantic anchor for all further extensions.
This script provides a coarse-grained refinement layer for SKOS mappings using four intuitive levels:
- high
- medium
- low
- dubious
It answers the question:
How can SKOS mappings be expressed with a small, human-friendly set of confidence levels while remaining compatible with the 7-star model?
- Introduces four sub-properties of
skos:relatedMatch - Derives numeric degrees from the same 7-star exponential function
- Aggregates star levels into bins:
- dubious → stars 1–2
- low → stars 3–4
- medium → star 5
- high → stars 6–7
- Annotates each property with:
skosplus:degreeOfConnection- an internal explanatory star bin (annotation only)
- Produces RDF, CSV, and a plot
This layer acts as a bridge between:
- the minimal SKOS baseline (3 relations)
- the fine-grained 7-star refinement
It is intended for use cases where interpretability and simplicity are preferred over maximal granularity.
skos_4level_mapping.ttlskos_4level_degrees.csvskos_4level_degree_plot.jpg
This script introduces a 7-star refinement of SKOS mappings that allows
skos:relatedMatch to be expressed at multiple granular levels.
It answers the question:
How can SKOS mappings be refined without breaking SKOS semantics?
- Introduces five sub-properties of
skos:relatedMatch:- very weak
- weak
- moderate
- strong
- very strong
- Maps:
- star level 6 →
skos:closeMatch - star level 7 →
skos:exactMatch
- star level 6 →
- Computes numeric degrees using a normalised, saturating exponential function
- Annotates each relation with:
- star level
- degree of connection
- an internal explanatory perception band
The perception band is modelled as an annotation property, not as part of the
object-property hierarchy.
This preserves a clean SKOS-first structure while keeping the internal logic documented.
skos_7star_mapping.ttlskos_7star_degrees.csvskos_7star_degree_plot.jpg
This script models natural language probability phrases (e.g. Highly Likely, Almost Certainly) as SKOS-compatible mapping relations based on empirical data.
It answers the question:
How do people interpret probability phrases, and how can this be integrated into SKOS mappings?
probly.csv
Derived from the study published at: https://github.com/zonination/perceptions
- Treats each perception phrase as a mapping property
- Computes:
- median
- quartiles
- interquartile range (IQR)
- Tukey whiskers
- Uses the median (normalised to 0–1) as the degree of connection
- Assigns each phrase as a sub-property of:
skos:exactMatchskos:closeMatchskos:relatedMatchbased on numeric thresholds
- Produces a plot showing:
- the 17 empirical medians
- a smooth approximation curve for generalisation
skos_perceptions_mapping.ttlskos_perceptions_stats.csvskos_perceptions_degree_plot.jpg
This script merges all RDF layers into a single coherent ontology.
It answers the question:
Can minimal SKOS mappings, 7-star refinement, and empirical perceptions coexist without semantic inconsistency?
- Loads:
skos_minimal_degrees.ttlskos_4level_mapping.ttlskos_7star_mapping.ttlskos_perceptions_mapping.ttl- Merges them into one RDF graph
- Relies on shared URIs, namespaces, and the SKOS backbone
merged_ontology.ttl
This file can be:
- opened directly in Protégé
- published as an ontology artefact
- referenced from academic publications
MIT License