Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-02-17 Thread Artur Zakirov
On 16.02.2016 18:14, Artur Zakirov wrote: I attached a new version of the patch. Sorry for noise. I attached new version of the patch. I saw mistakes in DecodeFlag(). This patch fix them. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company ***

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-02-16 Thread Artur Zakirov
I attached a new version of the patch. On 10.02.2016 19:46, Teodor Sigaev wrote: I duplicate the patch here. it's very good thing to update disctionaries to support modern versions. And thank you for improving documentation. Also I've impressed by long description in spell.c header. Som

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-02-11 Thread Artur Zakirov
Thank you for the review. On 10.02.2016 19:46, Teodor Sigaev wrote: I duplicate the patch here. it's very good thing to update disctionaries to support modern versions. And thank you for improving documentation. Also I've impressed by long description in spell.c header. Som notices about

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-02-10 Thread Teodor Sigaev
I duplicate the patch here. it's very good thing to update disctionaries to support modern versions. And thank you for improving documentation. Also I've impressed by long description in spell.c header. Som notices about code: 1 struct SPELL. Why do you remove union p? You leave comment

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-01-28 Thread Alvaro Herrera
Artur Zakirov wrote: > I undo the changes and the error will be raised. I will update the patch > soon. I don't think you ever did this. I'm closing it now, but it sounds useful stuff so please do resubmit for 2016-03. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-01-28 Thread Artur Zakirov
On 28.01.2016 14:19, Alvaro Herrera wrote: Artur Zakirov wrote: I undo the changes and the error will be raised. I will update the patch soon. I don't think you ever did this. I'm closing it now, but it sounds useful stuff so please do resubmit for 2016-03. I'm working on the patch. I

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-01-28 Thread Artur Zakirov
Sorry, I don't know why this thread was moved to another thread. I duplicate the patch here. On 28.01.2016 14:19, Alvaro Herrera wrote: Artur Zakirov wrote: I undo the changes and the error will be raised. I will update the patch soon. I don't think you ever did this. I'm closing it now,

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-01-09 Thread Artur Zakirov
On 09.01.2016 05:38, Alvaro Herrera wrote: Artur Zakirov wrote: Now almost all dictionaries are loaded into PostgreSQL. But the da_dk dictionary does not load. I see the following error: ERROR: invalid regular expression: quantifier operand invalid CONTEXT: line 439 of configuration file

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-01-09 Thread Artur Zakirov
Thanks for review. On 09.01.2016 02:04, Alvaro Herrera wrote: Artur Zakirov wrote: --- 74,80 typedef struct aff_struct { ! uint32 flag:16, type:1, flagflags:7,

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-01-08 Thread Alvaro Herrera
Artur Zakirov wrote: > *** 77,83 typedef struct spell_struct > > typedef struct aff_struct > { > ! uint32 flag:8, > type:1, > flagflags:7, > issimple:1, > --- 74,80 > >

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-01-08 Thread Alvaro Herrera
Artur Zakirov wrote: > Now almost all dictionaries are loaded into PostgreSQL. But the da_dk > dictionary does not load. I see the following error: > > ERROR: invalid regular expression: quantifier operand invalid > CONTEXT: line 439 of configuration file >

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-12-01 Thread Artur Zakirov
On 16.11.2015 15:51, Artur Zakirov wrote: On 10.11.2015 13:23, Artur Zakirov wrote: Link to patch in commitfest: https://commitfest.postgresql.org/8/420/ Link to regression tests: https://dl.dropboxusercontent.com/u/15423817/HunspellDictTest.tar.gz I have done some changes in documentation

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-11-16 Thread Artur Zakirov
On 10.11.2015 13:23, Artur Zakirov wrote: Link to patch in commitfest: https://commitfest.postgresql.org/8/420/ Link to regression tests: https://dl.dropboxusercontent.com/u/15423817/HunspellDictTest.tar.gz Hello! Do you have any remarks or comments about my patch? -- Artur Zakirov

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-11-10 Thread Artur Zakirov
08.11.2015 14:23, Artur Zakirov пишет: Thank you for reply. This was because of the flag field size of the SPELL struct. And long flags were being trancated in the .dict file. I attached new patch. It is temporary patch, not final. It can be done better. I have updated the patch and

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-11-08 Thread Artur Zakirov
On 07.11.2015 17:20, Emre Hasegeli wrote: It seems to have something to do with the order of the affixes. It works, if I move affix 2646 to the beginning of the list. [1] https://tr-spell.googlecode.com/files/dict_aff_5000_suffix_113_words.zip Thank you for reply. This was because of the

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-11-07 Thread Emre Hasegeli
Thank you for working on this. I tried the patch with a Turkish dictionary [1] I could find on the Internet. It worked for some words, but not others: > hasegeli=# create text search dictionary hunspell_tr (template = ispell, > dictfile = tr, afffile = tr); > CREATE TEXT SEARCH DICTIONARY > >

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-11-06 Thread Artur Zakirov
Hello again! Patches === I had implemented support for FLAG long, FLAG num and AF parameters. I attached patch to the e-mail (hunspell-dict.patch). This patch allow to use Hunspell dictionaries listed in the previous e-mail: ar, br_fr, ca, ca_valencia, en_ca, en_gb, en_us, fr, gl_es,

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-11-06 Thread Artur Zakirov
06.11.2015 12:33, Artur Zakirov пишет: Hello again! Patches === Link to commitfest: https://commitfest.postgresql.org/8/420/ -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-10-26 Thread Artur Zakirov
20.10.2015 17:00, Artur Zakirov пишет: These flag types are used in affix files of such dictionaries as ar, br_fr, ca, ca_valencia, da_dk, en_ca, en_gb, en_us, fr, gl_es, is, ne_np, nl_nl, si_lk (from http://cgit.freedesktop.org/libreoffice/dictionaries/tree/). Now almost all dictionaries are

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-10-21 Thread Artur Zakirov
21.10.2015 01:37, Jim Nasby пишет: On 10/20/15 9:00 AM, Artur Zakirov wrote: Internal representation of the dictionary in the PostgreSQL doesn't impose too strict limits on the number of affix rules. There are a flagval array, which size must be increased from 256 to 65000. Is that per

[HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-10-20 Thread Artur Zakirov
Hi. Introduction PostgreSQL full-text search extension uses dictionaries from the various open source spell checker software to perform word normalization. Currently, Ispell, MySpell and Hunspell dictionaries are supported. Dictionaries requires two files: a dictionary file and

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-10-20 Thread Jim Nasby
On 10/20/15 9:00 AM, Artur Zakirov wrote: Internal representation of the dictionary in the PostgreSQL doesn't impose too strict limits on the number of affix rules. There are a flagval array, which size must be increased from 256 to 65000. Is that per dictionary entry, fixed at 64k? That seems