Skip to main content

Associative memory and categories based on a directed acyclic graph data structure

Project description

OntoDAG

Associative memory and categories based on a directed acyclic graph data structure

Documentation

  • User Guide — installation, tutorial, Python API, command line, web app/REST, file formats, troubleshooting. Start here.
  • How It Works Inside — the design in plain language (canonical form, query planning, content-addressed persistence) and future plans.
  • docs/SWARM_DESIGN.md, docs/SEMANTIC_CODES.md — engineering design documents.

See also ontodag-fs: any OntoDAG store can be browsed as a filesystem — paths are category queries, files are classified objects stored on Swarm, FUSE-mountable (odag-fs, which shares odag's store settings).

Specification

A Directed Acyclic Graph (DAG) associative storage and category manager in Python. You can store items into a ontodag and recall items from it. To store or "put" an item into a ontodag, you give it a name and a set of other names of already existing items that are its supercategories. To recall or "get", you specify a set of item names to get all items that are subcategories of all these items.

Roadmap

  • Implement the basic DAG data structure (put, remove)
  • Simplify definitions not to include unnecessary links (e.g. bird under animal, animal is not needed)
    • During put keep a dictionary of 'done' nodes of the inserted item and all its super categories
    • Insert a link only to nodes which are not 'done'
    • Increment counter only for items which are not 'done'
  • Save/load data structure into/from file (try PKL)
  • Load ontology from file (e.g. OWL)
  • Visualize graph (with python library - Graphviz)
  • More extensive test cases
  • Select suitable ontology for importing (to serve as the basis of the DAG)
  • Sub-class of OntoDAG with counters (for statistics)
  • Predicated (parametric) items. Dealing with items not stored in the graph (e.g. numbers, intervals, geo coordinates, areas; general, hierarchical types (types stored in the graph))
  • Implement space and time calculation for graph items (e.g. century, GPS bounding box)
    • categories for item types, e.g. point in time, time interval, geo coordinates, geo area, url
    • way to handle non-stored numerical types (time intervals, geo coordinates, areas, numbers, arbitrary types)
    • way to store and retrieve ordered values (photo with exact time in response to "last week")
    • ways to define (partial) ordering function
    • file types (hierarchical, e.g. image, png)
  • Name usage across different instances of OntoDAG:
    • namespaces
    • avoiding confusing names (different language and usage, spelling)
    • ability to merge DAGs with different name usage, using namespaces
  • Optimize retrieval and storage by choosing subsets of query items and finding existing nodes already stored in the DAG.
  • Add and remove intermediate nodes to optimize search in the graph
  • Port implementation to Golang
  • Implement a REST API for the Golang (or Rust) implementation
  • Interface with a graph database implementation.
  • Implement a web interface for the REST API & host it on a website with user profiles
  • Implement a limited functionality (DAG-only) graph database for Ethereum Swarm
  • Design a plugin for Ethereum Swarm to store the DAG in a decentralized way

Potential Applications

  • Using the ontology graph for content categorization instead of folders
  • Replace content tags with a more structured ontology
  • Access control (ACT) groups
  • Memberships in organizations and gate content based on membership
  • Communication channel groups defined by the ontology
  • Fostering deals within a universal marketplace for services and goods

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ontodag-0.1.0.tar.gz (38.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ontodag-0.1.0-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file ontodag-0.1.0.tar.gz.

File metadata

  • Download URL: ontodag-0.1.0.tar.gz
  • Upload date:
  • Size: 38.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for ontodag-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6a6b8f97da4644d64e7bc848ea1ce553997af56dafd6ae91628d2c1c3bc6e3ee
MD5 336248c4d0b33c111a3090432c4d01ab
BLAKE2b-256 069619c091a6aef11d29e2aeaa1299f7def37f6f4412ade330cc86711dd1c9e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for ontodag-0.1.0.tar.gz:

Publisher: publish.yml on petfold/ontodag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ontodag-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ontodag-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for ontodag-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91771413a291adfd3d22f263dd30d9c8456716902e495aa13133ea206f2878a3
MD5 52e1bc5ca2de1c32042fd67790ae2c53
BLAKE2b-256 73251c6751f1913930065864ad2eb0cfa5568df2b6a67f790fce71d577c0c883

See more details on using hashes here.

Provenance

The following attestation bundles were made for ontodag-0.1.0-py3-none-any.whl:

Publisher: publish.yml on petfold/ontodag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page