Skip to content

pg_hspell

Full text search dictionary template for Hebrew text using libhspell

pg_hspell · Full text search dictionary template for Hebrew text using libhspell

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
101063pg_hspellpg_hspell1.0FTSMPL-2.0C

PostgreSQL · 10, 11, 12, 13, 14, 15, 16, 17, 18

Usage

Sources:

pg_hspell provides an hspell text-search dictionary template that lemmatizes Hebrew words. It requires GNU/Linux and an external libhspell built with --enable-linginfo.

The extension creates a dictionary but no complete text-search configuration, so map it into a configuration explicitly:

CREATE EXTENSION pg_hspell;

CREATE TEXT SEARCH CONFIGURATION hebrew (COPY = simple);
ALTER TEXT SEARCH CONFIGURATION hebrew
  ALTER MAPPING FOR word, hword, hword_part
  WITH hspell, simple;

SELECT to_tsvector('hebrew', 'הרכבת');

Linguistic limits

Version 1.0 documents PostgreSQL 9.6 and later. Recognized words emit every possible lemma without contextual disambiguation, improving recall at the cost of precision. Tokens containing Niqqud are not recognized by libhspell, and PostgreSQL’s default parser can split Hebrew acronyms or abbreviations around quotes. Strip Niqqud before this dictionary and test parser mappings with representative text.

Table reader