Skip to content

JackScanlon/Zondo

Repository files navigation

Zondo: MONDO Ontological Terms in Postgres Full-Text Search

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.

Caution

Still a work in progress.

Extracts & transforms MONDO ontological terms and their synonyms to generate a .ths file for use as a Postgres Full-Text Search (FtS) thesaurus configuration.

1. Usage

1.1. Prerequisites

  1. Download the MONDO JSON terms here or here.

  2. Download the most recent Zondo release here.

1.2. Using the executable

1.2.1. Building a Thesaurus

After installation of the Zondo executable, a thesaurus can be built for a given MONDO release by running the following command:

zondo build --input /path/to/mondo.json --outfile /path/to/en_ontology.ths 

Where --input describes the path to the MONDO JSON file and --outfile specifies the file path of the generated thesaurus.

1.2.1. Extracting Terms & Relationships

Generate CSVs of minified ontological terms & their relationships to consume in a relational database by running the following command:

zondo extract --input /path/to/mondo.json --outdir /path/to/output/dir`

Where --input describes the path to the MONDO JSON file and --outdir specifies where the thesaurus should be generated.

1.2.3. Command-Line Interface

zondo
Extract & transform ontological terms for Postgres Full-Text Search.

Usage:
	zondo {command} [flags]

Available Commands:
	* build     Build a PGXS thesaurus for a given MONDO release.
	* extract   Extract MONDO terms & relationships as RDBMS consumable CSV files.
	* version   Display the program version and exit.

Flags:
	-h, --help Display this help text and exit

2. Development

2.1. Prerequisites

Warning

Please ensure the compiler version matches the one used by this project, see .zigversion for more information.

  1. Install Zig.

  2. Install Docker.

2.2. Getting Started

2.2.1. Quick Start

  1. Install 2.1. Prerequisites.

  2. Clone this repository.

  3. Run zig build (or use the VSCode Build Debug task if applicable).

2.2.2. Example Release Commands

Type Command
Build zig build -Doptimize=ReleaseFast -Dstrip
Build & Run zig build run -Doptimize=ReleaseFast -Dstrip -- version

Todo

Temporary tracker:

  • Consider generating PGXS extension install package via templating
  • Add GH workflow for CI/CD/release & linting

About

SIMD-accelerated extraction & transformation of ontological terms for Postgres Full-Text Search

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors