Re: questions about tsearch2 (for czech language)

From: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: questions about tsearch2 (for czech language)
Date: 2003-12-22 11:25:50
Message-ID: Pine.LNX.4.44.0312221215570.27697-100000@kix.fsv.cvut.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > result. Why? Have I problem with my configuration?
>
> did you specify stop words in dictionaries configuration ?
>
> select * from pg_ts_dict;
>
tsearch2=# select * from pg_ts_dict where dict_name ='cz_ispell';
-[ RECORD 1
]---+--------------------------------------------------------------------------------------------------------------------------
dict_name | cz_ispell
dict_init | 173405
dict_initoption |
DictFile="/usr/lib/ispell/czech",AffFile="/usr/lib/ispell/czech.aff",StopFile="/usr/local/pgsql/share/contrib/czech.stop"
dict_lexize | 173406
dict_comment |

[postgres(at)usop root]$ cat /usr/local/pgsql/share/contrib/czech.stop|grep -e "^[sv]."
se
sem
si
svůj
ve
vám
váš
viz
vy

> >
> > 2. I use small czech dictionary. I need don't erase words which aren't in
> > dictionary (in my sample Stěhule). Can I set it somewhere? I tryed add
> > simple dict into cfg map, but witout sucess
> >
>
> Example, please ! What do you mean 'erase words' ?
>
>
> > tsearch2=# select * from ts_debug('jmenuji se Pavel Stěhule a bydlím ve
> > Skalici.'); ts_name | tok_type | description | token |
> > dict_name | tsvector
> > ---------------+----------+-------------+---------+--------------------+-----------
> > default_czech | word | Word | Stěhule | {cz_ispell,simple} |
> > default_czech | lword | Latin word | a | {cz_ispell,simple} |
> > default_czech | word | Word | bydlím | {cz_ispell,simple} |
> > 'bydlet'
> >
> >

If tsearch didn't find word in dictionary, then erase this from result.
True? My surname, fo example isn't in dictionary, but I wont save this
word in result (tsvector).

I use

tsearch2=# select version();
version
-------------------------------------------------------------------------------------------------------
PostgreSQL 7.4RC2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3
20030715 (Red Hat Linux 3.3-14)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Arjen van der Meijden 2003-12-22 11:34:31 Re: extracting date FROM timestamp
Previous Message javier garcia - CEBAS 2003-12-22 11:18:21 extracting date FROM timestamp