Crates.io | owlish |
lib.rs | owlish |
version | 0.28.0 |
source | src |
created_at | 2022-07-12 14:51:16.573985 |
updated_at | 2023-07-05 07:04:30.851336 |
description | OWL 2 implementation with wasm support and turtle parsing |
homepage | |
repository | https://github.com/field33/owlish |
max_upload_size | |
id | 624394 |
size | 17,540,496 |
This library provides OWL2 datastructures that allow you to build and work with ontologies.
The OWL2 model is based on functional style syntax. E.g. the function
ClassAssertion( :Person :Mary )
Is represented as a similar tuple struct
pub struct ClassAssertion(pub(crate) ClassConstructor, pub(crate) IndividualIRI);
owlish provides two APIs:
owlish::owl::*
To initialize the module in a Node.js environment, it is currently recommend to load the WASM module via the fs
API and
pass it explicitly to the initialization function.
Example:
import path from 'path';
import { readFile } from 'fs/promises';
import { fileURLToPath } from 'url';
// The next two lines are only required if running the Node script as an ESM module
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// Load .wasm file from the package
const owlishWasm = await readFile(path.join(__dirname, "../node_modules/owlish/owlish_bg.wasm"));
// Initialize module, after executing this line, all functions from `owlish` can be used like normal.
await owlish(owlishWasm)
Build:
cargo build
Test:
cargo test
Run benchmark tests:
cargo bench
This crate uses convenentional commits to create automated releases whenever the main branch is updated. In addition the CHANGELOG.md is automatically generated.