Re: Problems to create the portuguese dictionary

Lists: pgsql-generalpgsql-hackers
From: Luiz Claudio da Silva Leão <leao(at)embratel(dot)net(dot)br>
To: pgsql-general(at)postgresql(dot)org
Subject: Problems to create the portuguese dictionary
Date: 2006-12-01 19:02:57
Message-ID: 45707C61.90408@embratel.net.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

Hi,

I am trying to create de protuguese dictionary in order to use tserch2.

The steps I followed are described below:

1) Login system as user1
2) cd
3) tar -xvzf postgresql-8.1.5.tar.gz
4) cd postgresql-8.1.5
5) ./configure
6) gmake
7) su
8) gmake install
9) adduser postgres
10) mkdir /usr/local/pgsql/data
11) chown postgres /usr/local/pgsql/data
12) su - postgres
13) /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data --locale=pt_BR.utf8
14) /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
15) /usr/local/pgsql/bin/createdb test
16) /usr/local/pgsql/bin/psql test

Postgresql working.

17) \q (inside psql)
18) exit
19) cd /home/user1/postgresql-8.1.5/contrib/tsearch2
20) gmake
21) gmake install

Tsearch OK.

22) cd ./gendict
23) wget http://snowball.tartarus.org/algorithms/portuguese/stem.c
24) wget http://snowball.tartarus.org/algorithms/portuguese/stem.h
25) ./config -n pt -s -p portuguese_ISO_8859_1 -v -C'Snowball stemmer
for Portuguese'
26) cd ../../dict_pt
27) make

>>> Now I receive a lot of erros...

I think there are differences on interfaces involving snowball and
tsearch2.

Does anybody know how to create a new dictionary or have old versions of
stem.c and stem.h for portuguese?

Thanks,

Luiz Claudio Leao


From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Luiz Claudio da Silva Leão <leao(at)embratel(dot)net(dot)br>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problems to create the portuguese dictionary
Date: 2006-12-03 19:50:13
Message-ID: Pine.LNX.4.64.0612032248520.16338@sn.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

Luiz,

I posted answer in openfts mailing list. Short version:
get old .c,.h files from openfts cvs repository.

Oleg
On Fri, 1 Dec 2006, Luiz Claudio da Silva Le?o wrote:

> Hi,
>
> I am trying to create de protuguese dictionary in order to use tserch2.
>
> The steps I followed are described below:
>
> 1) Login system as user1
> 2) cd
> 3) tar -xvzf postgresql-8.1.5.tar.gz
> 4) cd postgresql-8.1.5
> 5) ./configure
> 6) gmake
> 7) su
> 8) gmake install
> 9) adduser postgres
> 10) mkdir /usr/local/pgsql/data
> 11) chown postgres /usr/local/pgsql/data
> 12) su - postgres
> 13) /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data --locale=pt_BR.utf8
> 14) /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
> 15) /usr/local/pgsql/bin/createdb test
> 16) /usr/local/pgsql/bin/psql test
>
> Postgresql working.
>
> 17) \q (inside psql)
> 18) exit
> 19) cd /home/user1/postgresql-8.1.5/contrib/tsearch2
> 20) gmake
> 21) gmake install
>
> Tsearch OK.
>
> 22) cd ./gendict
> 23) wget http://snowball.tartarus.org/algorithms/portuguese/stem.c
> 24) wget http://snowball.tartarus.org/algorithms/portuguese/stem.h
> 25) ./config -n pt -s -p portuguese_ISO_8859_1 -v -C'Snowball stemmer for
> Portuguese'
> 26) cd ../../dict_pt
> 27) make
>
>>>> Now I receive a lot of erros...
>
> I think there are differences on interfaces involving snowball and tsearch2.
>
> Does anybody know how to create a new dictionary or have old versions of
> stem.c and stem.h for portuguese?
>
> Thanks,
>
> Luiz Claudio Leao
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83


From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Luiz Claudio da Silva Leão <leao(at)embratel(dot)net(dot)br>
Cc: pgsql-general(at)postgresql(dot)org, openfts discussion <openfts-general(at)lists(dot)sourceforge(dot)net>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Fix for 8.2 release. Was: Problems to create the portuguese dictionary
Date: 2006-12-04 13:24:10
Message-ID: Pine.LNX.4.64.0612041621270.16338@sn.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

Hello,

we just released fix for 8.2 release, which updates Snowball API.
Patch is available from
http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/tsearch_snowball_82.gz

It's too late to apply fix to 8.2 release, sorry.

Oleg

On Fri, 1 Dec 2006, Luiz Claudio da Silva Le?o wrote:

> Hi,
>
> I am trying to create de protuguese dictionary in order to use tserch2.
>
> The steps I followed are described below:
>
> 1) Login system as user1
> 2) cd
> 3) tar -xvzf postgresql-8.1.5.tar.gz
> 4) cd postgresql-8.1.5
> 5) ./configure
> 6) gmake
> 7) su
> 8) gmake install
> 9) adduser postgres
> 10) mkdir /usr/local/pgsql/data
> 11) chown postgres /usr/local/pgsql/data
> 12) su - postgres
> 13) /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data --locale=pt_BR.utf8
> 14) /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
> 15) /usr/local/pgsql/bin/createdb test
> 16) /usr/local/pgsql/bin/psql test
>
> Postgresql working.
>
> 17) \q (inside psql)
> 18) exit
> 19) cd /home/user1/postgresql-8.1.5/contrib/tsearch2
> 20) gmake
> 21) gmake install
>
> Tsearch OK.
>
> 22) cd ./gendict
> 23) wget http://snowball.tartarus.org/algorithms/portuguese/stem.c
> 24) wget http://snowball.tartarus.org/algorithms/portuguese/stem.h
> 25) ./config -n pt -s -p portuguese_ISO_8859_1 -v -C'Snowball stemmer for
> Portuguese'
> 26) cd ../../dict_pt
> 27) make
>
>>>> Now I receive a lot of erros...
>
> I think there are differences on interfaces involving snowball and tsearch2.
>
> Does anybody know how to create a new dictionary or have old versions of
> stem.c and stem.h for portuguese?
>
> Thanks,
>
> Luiz Claudio Leao
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83