Hyperbase is a foundational Python library, released under the MIT licence, for building and working with Semantic Hypergraphs — ordered, recursive hyperedges that represent the structure of a natural language sentence rather than only its words — and it is aimed at researchers and engineers in NLP, knowledge representation, cognitive science, and computational social science who need that representation inside the scientific Python stack.
What it is
Hyperbase is a library for Semantic Hypergraphs (SH). A Semantic Hypergraph models a sentence as an ordered, recursive hyperlink rather than as a flat triple or a bag of tokens. The README's worked example is the sentence "Einstein first published the theory of relativity in 1905", which the library represents as a structured hyperedge, illustrated in the repository at assets/images/hyperedge-blocks.png. The library is written in Python so that it can both use and be embedded in the wider environment of scientific libraries available in that language.
The concrete problem it solves is representational. Knowledge graphs built from subject–predicate–object triples flatten nesting, ordering, and scope, so a sentence with an embedded clause, a temporal qualifier, or a recursive reference has to be decomposed and loses its shape. Hyperbase replaces that flattening with an ordered, recursive hyperedge structure that keeps the sentence's internal organisation intact, giving downstream knowledge-base, NLP, and NLU work a representation that matches the structure it started from.
Key capabilities
- Represents a full natural language sentence as an ordered, recursive hyperedge, demonstrated with "Einstein first published the theory of relativity in 1905".
- Supports recursive hyperlinks, so an edge can contain further hyperedges rather than only terminal nodes.
- Encodes ordering within a hyperedge, preserving sequence information that unordered hypergraph models drop.
- Provides the Semantic Hypergraph data model itself as the library's foundation, per the project tagline.
- Written in Python, with the stated goal of integrating with the scientific library ecosystem of that language.
- Aimed at knowledge representation, knowledge graph, and knowledge base construction workflows, per the repository topics.
- Targets NLP and natural language understanding pipelines, alongside cognitive science and computational social science research topics.
Who uses it and how
- NLP and NLU researchers who need a sentence-level structure richer than dependency or triple output, and who want it in Python rather than in a separate service.
- Knowledge representation and knowledge base teams building stores where entities, events, and nested statements must stay distinguishable.
- Cognitive science and computational social science researchers, the two fields named in the repository topics and in the project's funding context.
- Research groups funded or affiliated with CNRS, the funder named in the README, and with the ERC Consolidator Grant Socsemics (grant #772743), which supported the library and the research behind it.
- Contributors who want to extend the model: pull requests are welcome, and the README asks that major changes start as an issue so the change can be discussed first, with tests updated alongside.
Getting started
The README states that installation instructions and the manual are hosted externally, at the project homepage https://hyperquest.ai/hyperbase; that page is the documented starting point for installing and running the library. No package name or installation command appears in the README excerpt, so the homepage manual is the authoritative source.
How it compares
The facts provided name no paid products that Hyperbase replaces, and name no comparable hypergraph or knowledge-representation tools. On the evidence available, it stands alone in this registry: a single MIT-licensed Python library for Semantic Hypergraphs, with no sibling entry to contrast it against on licence, self-hosting, data ownership, or cost.
When to use it — and when not to
There is no hosted service, no database, and no SMTP or storage dependency to operate here: installing the library is the whole deployment, and it imposes nothing on the machine beyond a Python environment. That also means a self-hoster gets the data model and nothing else — no server, no query layer, no UI — and must supply the surrounding knowledge-base infrastructure. The README is sparse, the installation path lives off-repository on the homepage, and the registry facts record no release tag, so anyone who needs a stable, versioned package or an actively documented API should verify the current state of the repository and manual before committing to it.