Skip to content

NeverBlink-OSS/rdf-tensor

Repository files navigation

RDF-tensor

Specification for tensor literals in RDF & SPARQL

See the website for more information.

This is an extension to RDF and SPARQL that introduces 2 new datatypes, dozens of SPARQL functions, and new aggregates to allow for processing of data tensors within RDF graphs. A data tensor is a multi-dimensional array of values, which can be numeric or boolean, commonly used for example in machine learning embeddings.

Features

  • New datatypes:
    • tensor:DataTensor – represents tensors containing numeric or boolean values
    • tensor:Range – represents the range of numbers, either concrete (e.g., 0 to 1) or fully open (e.g., all numbers)
  • New SPARQL functions:
    • Tensor manipulations (addition, multiplication, reshaping, etc.)
    • Algebraic computations
  • New aggregates:
    • Generalized aggregation functions for numerical tensors
    • Sum, average, variance, and standard deviation computations

Implemented datatypes, functions, aggregates, ontology files

See the website for more details.

Editing the documentation

  1. Clone the repository: git clone git@github.com:NeverBlink-OSS/rdf-tensor.git
  2. Create a new Python virtual environment using your favorite tool (e.g., venv).
  3. Install the dependencies: pip install -r requirements.txt
  4. Compile the docs and host them locally for testing: mkdocs serve
  5. Whenever you make changes to the documentation pages (they reside in the docs directory), the docs will be automatically recompiled.

Authors, licensing

The original SPARQL extension and implementation for Jena were done by Piotr Marciniak – see the original repository.

The work is continued in this repository under the stewardship of NeverBlink. The current maintainers are Piotr Sowiński (Ostrzyciel) and Nik Kozlov.

This repository is licensed under Apache License 2.0.

Citation

If you use this work in an academic context, please cite it as follows:

Marciniak, P., Sowiński, P., & Ganzha, M. (2025). Representing and Querying Data Tensors in RDF and SPARQL [Conference paper]. Curry, E., et al. The Semantic Web: ESWC 2025 Satellite Events. ESWC 2025. Lecture Notes in Computer Science, 15832. https://doi.org/10.1007/978-3-031-99554-5_12

@inproceedings{rdftensor_2025,
  author = {Marciniak, Piotr and Sowiński, Piotr and Ganzha, Maria},
  booktitle = {Curry, E., et al. The Semantic Web: ESWC 2025 Satellite Events. ESWC 2025. Lecture Notes in Computer Science},
  publisher = {Springer, Cham},
  title = {{Representing and Querying Data Tensors in RDF and SPARQL}},
  url = {https://doi.org/10.1007/978-3-031-99554-5_12},
  year = {2025}
}

About

Specification for tensor literals in RDF & SPARQL

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors