SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2307.03067 · 2023

DeepOnto: A Python Package for Ontology Engineering with Deep Learning

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2307.03067.json · badge: /api/ran/2307.03067.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
KRR-Oxford/DeepOnto canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
FunctionStatusWhere it lives
debug Ran
ran; our contract draft was wrong, not the code
KRR-Oxford/DeepOnto/src/deeponto/utils/decorators.py
code served (permissive licence) · get_code("01e6eb3a49981088")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from functools import wraps

torch.manual_seed(0)

def debug(function):
    """Print the function signature and return value."""

    @wraps(function)
    def wrapper_debug(*args, **kwargs):
        args_repr = [repr(a) for a in args]
        kwargs_repr = [f'{k}={v!r}' for k, v in kwargs.items()]
        signature = ', '.join(args_repr + kwargs_repr)
        print(f'Calling {function.__name__}({signature})')
        value = function(*args, **kwargs)
        print(f'{function.__name__!r} returned {value!r}.')
        return value
    return wrapper_debug


def sample_function(x, y=10):
    """A simple function to be decorated."""
    return x + y


decorated_func = debug(sample_function)

ARGS = {
    'function': sample_function
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_file Ran
ran; our contract draft was wrong, not the code
KRR-Oxford/DeepOnto/src/deeponto/utils/file_utils.py
code served (permissive licence) · get_code("307b5ecd9046ae51")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import dill as pickle
import yaml
import tempfile
import os

# Create temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create a test JSON file
json_path = os.path.join(temp_dir, 'test.json')
test_json_data = {'key': 'value', 'number': 42}
with open(json_path, 'w') as f:
    json.dump(test_json_data, f)

# Create a test pickle file
pkl_path = os.path.join(temp_dir, 'test.pkl')
test_pkl_data = {'data': [1, 2, 3], 'nested': {'a': 1}}
with open(pkl_path, 'wb') as f:
    pickle.dump(test_pkl_data, f)

# Create a test YAML file
yaml_path = os.path.join(temp_dir, 'test.yaml')
test_yaml_data = {'config': 'value', 'items': [1, 2, 3]}
with open(yaml_path, 'w') as f:
    yaml.dump(test_yaml_data, f)

# Define ARGS - we'll test with the JSON file as the primary case
ARGS = {
    'save_path': json_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
dill, yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
paper Ran
ran; our contract draft was wrong, not the code
KRR-Oxford/DeepOnto/src/deeponto/utils/decorators.py
code served (permissive licence) · get_code("51297be85c66ab8c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The `paper` function takes two string parameters: title and link
# It returns a decorator that wraps a function and adds paper_title and paper_link attributes
# No complex objects are needed - just strings

ARGS = {
    'title': 'Attention Is All You Need',
    'link': 'https://arxiv.org/abs/1706.03762'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
print_dict Ran
ran; our contract draft was wrong, not the code
KRR-Oxford/DeepOnto/src/deeponto/utils/data_utils.py
code served (permissive licence) · get_code("8253327e28662c19")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json

def print_dict(dic: dict):
    """Pretty print a dictionary."""
    pretty_print = json.dumps(dic, indent=4, separators=(',', ': '))
    return pretty_print

ARGS = {
    "dic": {
        "name": "Alice",
        "age": 30,
        "city": "New York",
        "hobbies": ["reading", "hiking", "coding"],
        "nested": {
            "key1": "value1",
            "key2": 42
        }
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_jsonl Ran
ran; our contract draft was wrong, not the code
KRR-Oxford/DeepOnto/src/deeponto/utils/file_utils.py
code served (permissive licence) · get_code("6ad437c9f60ec4a6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
import os

# Create a temporary JSONL file with sample data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.jsonl")

# Write sample JSONL data
with open(temp_file, 'w', encoding='utf-8') as f:
    f.write('{"name": "Alice", "age": 30, "city": "New York"}\n')
    f.write('{"name": "Bob", "age": 25, "city": "London"}\n')
    f.write('{"name": "Charlie", "age": 35, "city": "Paris"}\n')

ARGS = {
    'file_path': temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_table Ran
ran; our contract draft was wrong, not the code
KRR-Oxford/DeepOnto/src/deeponto/utils/file_utils.py
code served (permissive licence) · get_code("8082b472eef3e092")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned DataFrame. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import tempfile
import os

# Create a temporary CSV file for testing
temp_dir = tempfile.mkdtemp()
csv_file_path = os.path.join(temp_dir, "test_table.csv")

# Write a sample CSV file with some data including NULL, null, n/a strings
csv_content = """name,age,city,notes
Alice,25,NYC,NULL
Bob,30,LA,null
Charlie,35,Chicago,n/a
Diana,28,Boston,valid_note"""

with open(csv_file_path, 'w') as f:
    f.write(csv_content)

ARGS = {
    'table_file_path': csv_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sort_dict_by_values Ran
ran; our contract draft was wrong, not the code
KRR-Oxford/DeepOnto/src/deeponto/utils/data_utils.py
code served (permissive licence) · get_code("ae416354815a0955")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Construct a sample dictionary with numeric values to sort
sample_dict = {
    'apple': 5,
    'banana': 2,
    'cherry': 8,
    'date': 3,
    'elderberry': 1
}

ARGS = {
    'dic': sample_dict,
    'desc': True,
    'k': 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
timer Ran
ran; our contract draft was wrong, not the code
KRR-Oxford/DeepOnto/src/deeponto/utils/decorators.py
code served (permissive licence) · get_code("e3fa9a764d4c773b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import time
from functools import wraps

def timer(function):
    """Print the runtime of the decorated function."""

    @wraps(function)
    def wrapper_timer(*args, **kwargs):
        start_time = time.perf_counter()
        value = function(*args, **kwargs)
        end_time = time.perf_counter()
        run_time = end_time - start_time
        print(f'Finished {function.__name__!r} in {run_time:.4f} secs.')
        return value
    return wrapper_timer


def sample_function(x, y):
    """A simple function to be decorated."""
    return x + y


ARGS = {
    'function': sample_function
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
uniqify Ran
ran; our contract draft was wrong, not the code
KRR-Oxford/DeepOnto/src/deeponto/utils/data_utils.py
code served (permissive licence) · get_code("df95793f03e10e35")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Analyze the function:
# - uniqify takes a single parameter 'ls' (a list)
# - It filters out empty strings ''
# - It removes duplicates while preserving order using dict.fromkeys()
# - It expects ls to be iterable and contain string elements

# Create a test list with some duplicates and empty strings
test_list = ['apple', 'banana', 'apple', '', 'cherry', 'banana', '', 'date']

ARGS = {
    'ls': test_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Integrating deep learning techniques, particularly language models (LMs), with knowledge representation techniques like ontologies has raised widespread attention, urging the need of a platform that supports both paradigms. Although packages such as OWL API and Jena offer robust support for basic ontology processing features, they lack the capability to transform various types of information within ontologies into formats suitable for downstream deep learning-based applications. Moreover, widely-used ontology APIs are primarily Java-based while deep learning frameworks like PyTorch and Tensorflow are mainly for Python programming. To address the needs, we present DeepOnto, a Python package designed for ontology engineering with deep learning. The package encompasses a core ontology processing module founded on the widely-recognised and reliable OWL API, encapsulating its fundamental features in a more "Pythonic" manner and extending its capabilities to incorporate other essential components including reasoning, verbalisation, normalisation, taxonomy, projection, and more. Building on this module, DeepOnto offers a suite of tools, resources, and algorithms that support various ontology engineering tasks, such as ontology alignment and completion, by harnessing deep learning methods, primarily pre-trained LMs. In this paper, we also demonstrate the practical utility of DeepOnto through two use-cases: the Digital Health Coaching in Samsung Research UK and the Bio-ML track of the Ontology Alignment Evaluation Initiative (OAEI).

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2307.03067")
get_code_for_paper("2307.03067")
have("2307.03067")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2307.03067.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2307.03067.svg)](https://syntology.ai/paper/2307.03067)

Connect an agent — have() is free.