<p>Lexize is meant to turn a word into a lexem. It is possible to
receive more than one lexem returned for a single word.</p>
<pre>
SELECT lexize('en_ispell', 'conditionally');
lexize
lexize
-----------------------------
-----------------------------
{conditionally,conditional}
{conditionally,conditional}
(1 row)
(1 row)
</pre>
</pre>
<p>The lexize function is not meant to take a full string as an
<p>The lexize function is not meant to take a full string as an
argument to return lexems for. If you passed in an entire sentence,
argument to return lexems for. If you passed in an entire
it attempts to find that entire sentence in the dictionary. Since
sentence, it attempts to find that entire sentence in the
the dictionary contains only words, you will receive an empty
dictionary. SInce the dictionary contains only words, you will
result set back.</p>
receive an empty result set back.</p>
<pre>
<pre> SELECT lexize('en_ispell', 'This is a senctece to lexize');
SELECT lexize('en_ispell', 'This is a senctece to lexize');
lexize
lexize
--------
--------
(1 row)
(1 row)
If you parse a lexem from a word not in the dictionary, then you will receive an empty result. This makes sense because the word "tsearch" is not int the english dictionary. You can create your own additions to the dictionary if you like. This may be useful for scientific or technical glossaries that need to be indexed. SELECT lexize('en_ispell', 'tsearch'); lexize -------- (1 row)
If you parse a lexem from a word not in the dictionary, then you will receive an empty result. This makes sense because the word "tsearch" is not in the english dictionary. You can create your own additions to the dictionary if you like. This may be useful for scientific or technical glossaries that need to be indexed. SELECT lexize('en_ispell', 'tsearch'); lexize -------- (1 row)
</pre>
<p>This is not to say that tsearch will be ignored when adding
text information to the the tsvector index column. This will be
explained in greater detail with the table pg_ts_cfgmap.</p>
<p>Next we need to set up the configuration for mapping the
</pre>
dictionay use to the lexxem parsings. This will be done by
<p>This is not to say that tsearch will be ignored when adding text
altering the pg_ts_cfgmap table. We will insert several rows,
information to the the tsvector index column. This will be
specifying to using the new dictionary we installed and
explained in greater detail with the table pg_ts_cfgmap.</p>
configured for use within tsearch2. There are several type of
<p>Next we need to set up the configuration for mapping the
lexims we would be concerned with forcing the use of the ISpell
dictionay use to the lexxem parsings. This will be done by altering
dictionary.</p>
the pg_ts_cfgmap table. We will insert several rows, specifying to
<pre> INSERT INTO pg_ts_cfgmap (ts_name, tok_alias, dict_name)
use the new dictionary we installed and configured for lexizing
within tsearch2. There are several type of lexims we would be
concerned with forcing the use of the ISpell dictionary.</p>
<pre>
INSERT INTO pg_ts_cfgmap (ts_name, tok_alias, dict_name)