Houston-Inc/dict_voikko


PostgreSQL full text search dictionary utilizing the Finnish dictionary Voikko.

License: PostgreSQL

Language: C


dict_voikko

PostgreSQL full text search dictionary extension utilizing the Finnish dictionary Voikko.

dict_voikko uses the base form of Finnish words as lexems. For compound words it uses the base form of the non-compound words from which the compound word is built. If dict_voikko doesn't recognise the it returns NULL, so dict_voikko should always be chained with another dictionary.

Dependencies

The dictionary needs libvoikki and its dependencies. A suomi-malaga dictionary with morphological analysis for Voikko is neede (e.g. dict-morpho from http://www.puimula.org/htp/testing/voikko-snapshot/) and at the moment it needs to be called mor-morpho.

Installation

Put dict_voikko in [POSTGRES]/contrib/ and compile.

###In PostgreSQL

Run something like:

CREATE EXTENSION dict_voikko;

CREATE TEXT SEARCH DICTIONARY voikko_stopwords (
    TEMPLATE = voikko_template, StopWords = finnish
);

CREATE TEXT SEARCH CONFIGURATION voikko (COPY = public.finnish);

ALTER TEXT SEARCH CONFIGURATION voikko 
    ALTER MAPPING FOR asciiword, asciihword, hword_asciipart, word, hword, hword_part 
    WITH voikko_stopwords, finnish_stem;

Test with

select ts_lexize('voikko', 'kerrostalollekohan');

The result should be:

 ts_lexize   
-----------
 {kerros,talo}
(1 row)

Project Statistics

Sourcerank 5
Repository Size 6.84 KB
Stars 9
Forks 6
Watchers 37
Open issues 0
Dependencies 0
Contributors 4
Tags 0
Created
Last updated
Last pushed

Top Contributors See all

Petter Ljungqvist timomi Tero Laitinen Antti Risteli

Interesting Forks See all

sarkkine/dict_voikko
PostgreSQL full text search dictionary utilizing the Finnish dictionary Voikko.
C - Last pushed - 2 stars - 1 forks

Something wrong with this page? Make a suggestion

Last synced: 2018-11-22 09:42:19 UTC

Login to resync this repository