OntoMeter
Documentation: https://growgraph.github.io/OntoMeter
Ontology quality assessment. Point it at an OWL/RDF/Turtle file and it computes the sixteen OQuaRE metrics, scales each to 1–5, rolls them up into quality characteristics, and — where a language model is configured — adds a review of the things structural metrics cannot see.
pip install ontometer
ontometer eval my-ontology.ttl
The abstractness race, from the corpus half: every newer ontology that builds on another pulls it toward the centre. Explore it.
1. What you get
$ ontometer eval test/fixtures/small.ttl --no-review
# Ontology evaluation — `test/fixtures/small.ttl`
**Overall 3.98/5** across 7 characteristics, aggregated by `mean`.
## Characteristics
| Characteristic | Score | |
|---------------------|-------|---------|
| Functional adequacy | 2.15 | `██···` |
| Structural | 4.00 | `████·` |
| Maintainability | 4.78 | `█████` |
## Metrics
| Metric | Name | Value | Score | Formula |
|-----------|--------------------|-------|-------|-----------------------------------------------|
| `AROnto` | Attribute richness | 0.143 | 1/5 | datatype-property domain axioms / (\|C\| + 1) |
| `CROnto` | Class population | 0.143 | 1/5 | \|individuals\| / (\|C\| + 1) |
| `DITOnto` | Depth of hierarchy | 4.000 | 4/5 | classes on the longest leaf-to-owl:Thing path |
## Weakest metrics, and what drives them
**CROnto** (Class population) — 1/5
- `http://example.org/small#Animal`
- `http://example.org/small#Mammal`
- `http://example.org/small#Orphan`
Abridged.
Every metric reports the formula it actually computed. That is not decoration: the
OQuaRE implementations in circulation disagree with each other on most metrics, and with the
published descriptions. OntoMeter follows the authors' reference implementation, and each
metric states its formula, the source it follows, and how it departs from it
(ontometer model --what metrics), so a diverging number can be traced to a definition.
2. The review
Structural metrics cannot tell you whether an ontology models its domain correctly, whether its terms mean what their names suggest, or whether it is internally consistent. OQuaRE knows this — a large minority of its sub-characteristics have no supporting metric at all:
ontometer model --what unsupported
That gap is what the review is for. It receives the weakest metrics and the specific entities driving them, and returns findings ranked by what they actually break:
defect— changes what a reasoner concludes. A property declaredrdfs:subPropertyOfa datatype; twordfs:domaintriples on one property, which OWL reads as conjunction so every subject is inferred into both classes at once; a cycle in the subsumption hierarchy.weakness— sound but will cause trouble. Undeclared domains, absent inverse properties on a graph built for navigation.suggestion— style and documentation.
The model never produces a number. Metrics are computed; the review explains and recommends.
export LLM_PROVIDER=ollama
export LLM_MODEL_NAME=llama3.1
ontometer eval my-ontology.ttl
Configuration is read from the process environment:
| Variable | Meaning | Default |
|---|---|---|
LLM_PROVIDER |
openai or ollama |
openai |
LLM_MODEL_NAME |
Model identifier | gpt-4o-mini |
LLM_BASE_URL |
Endpoint override; any OpenAI-compatible server works | provider default |
LLM_API_KEY |
Required for openai, unused for ollama |
— |
LLM_TEMPERATURE |
Sampling temperature | 0.0 |
LLM_PARSE_RETRIES |
Retries when the reply does not validate | 2 |
Metrics compute with or without a provider. With none configured the report still renders and says why the review is missing, because a quality checker that fails closed on an absent API key is useless in the CI pipelines most of these will run in.
3. Using it in CI
ontometer eval ontology.ttl --no-review --format json -o report.json
ontometer eval ontology.ttl --no-review --fail-under 3.5
--fail-under exits non-zero when the overall score drops below a threshold. Treat the
overall number as a tripwire for regressions, not as a verdict — OQuaRE defines no overall
score, and this one is an unweighted mean of characteristic scores.
4. The quality model is configuration
Thresholds and the characteristic → sub-characteristic → metric map ship as YAML read at
runtime, not compiled in. OQuaRE's thresholds were never published in an archival form; the
ones shipped are taken from the authors' reference implementation, each cited in
scales.yaml, and are editable rather than authoritative.
ontometer model --what metrics # every metric and its formula
ontometer model --what scales # threshold families and cut points
ontometer model --what characteristics # the full rollup map
ontometer model --what unsupported # what no metric covers
Which metrics support which sub-characteristic, and how they combine, follow the authors'
reference implementation: an unweighted mean at both levels, with a few metrics entering
inverted (-NOCOnto in quality_model.yaml means 6 - score). Both are declared in the YAML
rather than hidden in code.
5. As a library
from ontometer import evaluate
result = evaluate("my-ontology.ttl", with_review=False)
result.assessment.metrics["DITOnto"].score # 5
result.assessment.characteristics["structural"] # 4.12
result.assessment.worst_metrics(3) # the three weakest
result.assessment.seeds["ANOnto"] # undocumented classes
result.view.external_namespaces # vocabulary borrowed, not declared
6. The corpus half
OntoMeter is also a research project on ontologies as a population: how they depend on
each other, how abstract their terms are, and how the network of ontologies grows. That half
lives in ontometer.corpus and needs a heavier dependency set, so it sits behind an extra:
pip install "ontometer[corpus]"
It fetches from ten registries (six OntoPortal Alliance instances, OBO Foundry, Ontohub,
OKG, LOV), parses each file for its structural and metadata footprint, deduplicates across
sources and versions, and assembles a dependency network distinguishing declared reuse
(owl:imports) from actual reuse: terms used from a namespace that was never imported.
On top of that network it measures the abstractness of terms and ontologies, and rebuilds the
specialisation network of ontologies over time.
ontometer/corpus/README.md: the pipeline end to end, and reproducing it from a clean checkoutontometer/corpus/pipeline/README.md: fetch, then seed → parse → dedupontometer/corpus/network/README.md: the node and edge model- Abstractness and the abstractness race (the G(t) explorer) in the documentation
export ONTOMETER_STORE="$HOME/ontometer-store" # raw files and structural sidecars
uv run python run/fetch_ontologies.py --sources lov --ontoportal BioPortal
uv run python run/process.py --phases seed,parse,dedup
uv run python -m ontometer.corpus.network.construction
Corpus artifacts live in their own git repository,
growgraph/ontometer-corpus; pass its data/ directory as
--corpus (or ONTOMETER_CORPUS). They are versioned because they cannot be
re-fetched into existence: registries change, and a crawl run today produces a different
corpus rather than this one. They are kept compact by projecting
registry metadata to a field allowlist before storage. The raw object store of ontology files
is not tracked. See ontometer/corpus/README.md for what reproducing the corpus does and
does not mean.
7. Prior art
OntoMeter is not the first tool to compute OQuaRE. OntoInsight pairs the metrics with
LLM recommendations over a Java OWL API engine; oquare-metrics wraps the same engine
as a CI action; NEOntometrics computes OQuaRE and OntoQA at scale with version tracking.
What is different here: pure Python, so there is no JVM to install; external-namespace coupling, which OQuaRE does not model at all; and the population dimension — every tool in that list is strictly single-ontology, so none of them can tell you whether a score is unusual.
8. Development
uv sync --extra dev --extra store # name every extra you need in one sync
uv run pytest test
uv run ruff check && uv run ruff format
uv run pre-commit install
uv sync --extra docs --extra corpus && uv run properdocs serve # the documentation site
CI on every pull request and every push to main runs pre-commit (ruff and
ty) and pytest with the dev and corpus extras. Publishing to PyPI is a
GitHub Release whose tag is v followed by version in pyproject.toml.
License
Metadata
Release files for ontometer 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ontometer-0.1.2.tar.gz | 280.6 kB | Without provenance | Details for ontometer-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ontometer-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for ontometer-0.1.2-py3-none-any.whl |
Total release size: 510.5 kB
Release files / ontometer-0.1.2.tar.gz
| Download URL | ontometer-0.1.2.tar.gz |
|---|---|
| Size | 280.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49475a2dbba78d214a4950feb5f0859717cdf2834cfc2cf459b5e4cce218d124
|
|
BLAKE2b-256 checksum How to use checksums |
40d4cd8e03e970e25fd501a518d2b2d9a73ed78838d71253e536c85dae93aec8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ontometer-0.1.2-py3-none-any.whl
| Download URL | ontometer-0.1.2-py3-none-any.whl |
|---|---|
| Size | 230.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae5cf6b2b3d0e3c92aaa6aabd043caa37c3ce537820dadc5840f722aa78ff0a4
|
|
BLAKE2b-256 checksum How to use checksums |
3157a8e2cf3aa55c7dc3603d567fc24d6cb4da161fac16e56b798ba7dcea592b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for ontometer 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.