Re: a tsearch2 (8.2.4) dictionary that only filters out stopwords

From: Jan Urbański <j(dot)urbanski(at)students(dot)mimuw(dot)edu(dot)pl>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: a tsearch2 (8.2.4) dictionary that only filters out stopwords
Date: 2007-11-09 11:44:07
Message-ID: 47344807.2070208@students.mimuw.edu.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

>> The solution I came up with was simple: write a dictionary, that does
>> only one thing: looks up the lexeme in a stopwords file and either
>> discards it or returns NULL.
>
> Doesn't the "simple" dictionary handle this?

I don't think so. The 'simple' dictionary discards stopwords, but
accepts any other lexemes. So if use {'simple', 'pl_ispell'} for my
config, I'll get rid of the stopwords, but I won't get any lexemes
stemmed by ispell. Every lexeme that's not a stopword will produce the
very same lexeme (this is how I think the 'simple' dictionary works).

My dictionary does basically the same thing as the 'simple' dictionary,
but it returns NULL instead of the original lexeme in case the lexeme is
not found in the stopwords file.

Regards,
--
Jan Urbanski
GPG key ID: E583D7D2

ouden estin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2007-11-09 12:01:04 Re: a tsearch2 (8.2.4) dictionary that only filters out stopwords
Previous Message Zdenek Kotala 2007-11-09 11:34:39 Re: Feature request concerning postmaster log file.

Browse pgsql-patches by date

  From Date Subject
Next Message Heikki Linnakangas 2007-11-09 12:01:04 Re: a tsearch2 (8.2.4) dictionary that only filters out stopwords
Previous Message Simon Riggs 2007-11-09 09:16:54 Re: Fix for stop words in thesaurus file