Python bindings for Oxid-DB: a neurosymbolic database combining ontology reasoning with vector search
Project description
oxiddb
Python bindings for Oxid-DB: a neurosymbolic database combining ontology reasoning with vector search.
This is the embedded package: the database runs in-process inside your
Python program (no server, no network). If instead you want to talk to a running
Oxid-DB server over HTTP, use the separate remote client
oxiddb-client — same project, two
delivery models. Install whichever matches how you deploy.
Installation
pip install oxiddb
Quick Start
import oxiddb
# Create a database with 4-dimensional vectors
db = oxiddb.OxidDB(dim=4)
# Build ontology
db.add_subclass("Pilsner", "Beer")
db.add_subclass("Stout", "Beer")
# Insert individuals with vectors
db.insert("Heineken", "Pilsner", vector=[0.9, 0.1, 0.0, 0.0])
db.insert("Guinness", "Stout", vector=[0.1, 0.0, 0.8, 0.9])
# Run the OWL 2 EL reasoner
db.classify()
# Query using OxQL
results = db.query("FIND ?x WHERE ?x IS-A Beer NEAR ?x TO [0.9, 0.1, 0.0, 0.0] LIMIT 5")
for r in results:
print(f"{r.iri}: {r.score:.4f}")
# Save to disk
db.save("my_database.oxd")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oxiddb-0.8.2.tar.gz.
File metadata
- Download URL: oxiddb-0.8.2.tar.gz
- Upload date:
- Size: 7.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a518e6b6c407674e8ac737d78af260434afe38b4b17a00c35c372f0c79ee1ff4
|
|
| MD5 |
dae57f0237349253ce2c27c8bd87f073
|
|
| BLAKE2b-256 |
53a1ff5f04effcc347ed378965d171162f56e310e2884050ac94632ffef93b2e
|
File details
Details for the file oxiddb-0.8.2-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: oxiddb-0.8.2-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 11.3 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22c8f37fa481004f2c8b333f0bf4b6a7b105e73e02424b5e8660b89d45c27d36
|
|
| MD5 |
d35dd7591a770ca38f5976ee31c5cf5b
|
|
| BLAKE2b-256 |
899c8479b2098272ff374c8d076478283db066b74dae8f99e3a10e4fb6eaa901
|