HomeMogDBMogDB StackUqbar
v2.1

Documentation:v2.1

Supported Versions:

Other Versions:

Testing a Dictionary

The ts_lexize function facilitates dictionary testing.

ts_lexize(dict regdictionary, token text) returns text[] ts_lexize returns an array of lexemes if the input token is known to the dictionary, or an empty array if the token is known to the dictionary but it is a stop word, or NULL if it is an unknown word.

Example:

mogdb=# SELECT ts_lexize('english_stem', 'stars');
 ts_lexize
-----------
 {star}

mogdb=# SELECT ts_lexize('english_stem', 'a');
 ts_lexize
-----------
 {}

img NOTICE: The ts_lexize function expects a single token, not text.

Copyright © 2011-2024 www.enmotech.com All rights reserved.