Skip to content

Measurement units / OBO

The units.obo source on GitHub contains three synthetic terms: metre, kilogram, and second. DEMO identifiers are local examples, not identifiers from the Unit Ontology. The kilogram stanza deliberately contains an incorrect definition.

Scan definitions and synonyms

The example config on GitHub selects every definition and synonym in each stanza. The entire stanza, including its name, is supplied as context. Only the selected fields receive scores.

OBO tags become lists, even when a tag occurs only once: /def/0 is the first definition, and /synonym/0 and /synonym/1 are separate synonyms. The config selects the fields that actually exist, so the metre stanza's two synonyms and the other stanzas' single synonyms are all assessed.

From a repository checkout, inspect the requests without making an API call:

cd examples/units
jevotron preview units.obo --config jev_config.py

Then scan with the same config. An uncached scan needs a configured API key:

jevotron scan units.obo --config jev_config.py

The guidance asks whether definitions and synonyms match the named measurement unit. This example assesses each stanza independently; its config supplies no related stanzas or ontology graph.

Actual output

The following output was captured from that command while replaying three cached Jev assessments. cached: true and the original assessment dates are preserved. An uncached run can produce different probabilities.

Terminal summary (stderr):

Assessed 3 entries (3 cached); 1 warnings; emitted 3 entries.

Warning: DEMO:0002 — kilogram

Original stanza at units.obo:12:

[Term]
id: DEMO:0002
name: kilogram
def: "An SI unit of time equal to sixty seconds." []
synonym: "kg" EXACT []

Actual JSONL result for this stanza (formatted for readability):

{
  "assessed_at": "2026-09-24T00:23:47.640019+00:00",
  "cached": true,
  "fields": [
    {
      "confidence": 1.0,
      "label": "ANOMALY",
      "path": "/def/0",
      "probabilities": {
        "ANOMALY": 1.0,
        "NORMAL": 0.0
      },
      "score": 1.0,
      "value": "\"An SI unit of time equal to sixty seconds.\" []"
    },
    {
      "confidence": 0.55,
      "label": "NORMAL",
      "path": "/synonym/0",
      "probabilities": {
        "ANOMALY": 0.22,
        "NORMAL": 0.78
      },
      "score": 0.22,
      "value": "\"kg\" EXACT []"
    }
  ],
  "id": "DEMO:0002",
  "label": "ANOMALY",
  "model": "jev-1.13.0",
  "request_hash": "f9303a9e43bff2a66a8590703038cbaac7bcf109c417b1708cb568222b6611ca",
  "score": 1.0,
  "source": "units.obo:12",
  "usage": {
    "input_tokens": 766,
    "output_tokens": 72
  },
  "warning": true
}

The default warning threshold is 0.5. In this result, /def/0 crosses that threshold; /synonym/0 does not. The stanza is marked as a warning because at least one selected field crosses the threshold. The result contains labels and probabilities; the original stanza above provides the context for reviewing them.

The complete three-entry JSONL output and terminal summary are available on GitHub.

Export warning entries

jevotron scan units.obo --config jev_config.py --warnings-only --output-format csv -o warnings.csv

The actual warning CSV contains both assessed fields of the kilogram stanza, including the normal kg synonym. --warnings-only filters entries, so it preserves the other assessed fields of each warning entry for review. With the same inputs and config, this export reuses the cached assessments.

Select just the definition without a config

jevotron scan units.obo --field /def/0 --guidance "The definition must match the named unit."

This requests a different assessment from the captured config-based run above.

Real ontologies are sparse: about 44% of mondo-edit.obo Term stanzas carry no def. Those entries are skipped and counted rather than ending the run, so the same command works on a full editors' file.

jt scan mondo-edit.obo --format-option stanza=Term --field /def/0 \
  --guidance "The definition must be consistent with the term name."
# Skipped 15974 entries lacking selected fields: /def/0 absent in 15974.

--format-option stanza=Term drops Typedef stanzas, which rarely carry a definition. See selecting sparse fields.