Skip to content

dict_croatian_stem

Croatian stemming dictionary and text search configuration

croatian-stemmer · Croatian stemming dictionary and text search configuration

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
102487dict_croatian_stemcroatian-stemmer1.0FTSLGPL-3.0-or-laterC

PostgreSQL · 15, 16, 17, 18

Usage

Sources:

dict_croatian_stem adds a Croatian stemming dictionary and text search configuration. The reviewed source declares extension version 1.0 and tests PostgreSQL 15–18. It is a C extension with no additional runtime dependency or preload requirement.

Search Croatian Text

Once server files are installed, a role with database CREATE privilege can install this trusted extension.

CREATE EXTENSION dict_croatian_stem;
SELECT ts_lexize('croatian_stem', 'gradovima');
SELECT to_tsvector('croatian', 'Lijepe kuće u velikom gradu')
       @@ to_tsquery('croatian', 'kuća & grad');

The dictionary reduces inflected words to stems. The extension creates croatian_stem_template, the croatian_stem dictionary and the croatian configuration; use the same configuration when indexing documents and processing queries.

Stop Words and Maintenance

Built-in stop words are always discarded. To add a list, install its file in the server text-search data directory and create a separate dictionary:

CREATE TEXT SEARCH DICTIONARY my_croatian_stem (
    TEMPLATE = croatian_stem_template,
    StopWords = my_croatian
);

This reads my_croatian.stop; creating the dictionary alone does not replace mappings in an existing search configuration. Map the relevant token classes to the new dictionary when adopting it. Recompute stored search vectors and rebuild affected indexes when stemming or stop-word behavior changes. Stemming is heuristic and does not establish semantic equivalence. The source is LGPL-3.0-or-later.

Table reader