Page 1 of 1

Doubt Working with Hunspell

Posted: Sun Mar 18, 2012 1:40 pm
by alexandreq
Hello Sergey,

I am working with this spellchecker, but some behavior has attracts my attention.

First: It is very slow to load the dictionary and it is worthy to release the application.

I loaded 3 dictionaries and when I close my application, it takes more than 15 seconds to release it. Do you have any Ideia why?

Another thing:

I don't know if it is possible to do this with this component.

I have a fold with 3 dictionaries, English US, Spanish and Portuguese.

There is an option where you must inform the path where are the dictionaries, I noticed when I pass the path, all the dictionaries is loaded turning my application very slowly to be load.

I don't want to load all dictionary from my path, is there any option that allow me to choose the dictionary to be load?

Something like:

Dic.load = 'english'

thanks
Alex

Posted: Sun Mar 18, 2012 2:00 pm
by alexandreq
Sergey,

I wonder if it is the version of the DLL.

I notice that the last update of hunspell was 2011-02-16 and the DLL I have is 2006-05-27

What do you think?

Posted: Sun Mar 18, 2012 8:51 pm
by alexandreq
Sergey,

A friend of mine compiled the new version of DLL of hunspell, I tried to use it but the hunspell exemple of your didn't load it. Why?

Here you can download the lastet version

http://www.oaklea-software.com/misc_dow ... nspell.dll
http://www.oaklea-software.com/misc_dow ... nspell.lib
http://www.oaklea-software.com/misc_dow ... nspell.exp

Posted: Wed Mar 21, 2012 4:53 pm
by Sergey Tkachenko
I am sorry for the delay, I'll answer tomorrow.

Posted: Thu Mar 22, 2012 2:24 pm
by alexandreq
ok

Posted: Fri Mar 23, 2012 4:14 pm
by Sergey Tkachenko
1) I cannot reproduce a slow loading. In my tests, applications are loaded without any delays.
2) The demo project load all available dictionaries in the folder, because it calls RVHunSpell1.LoadAllDictionaries.
To load one dictionary, call instead:

Code: Select all

  with RVHunSpell1.Dictionaries.Add do begin
    Load('en_US');
    if not Active then
      Free;
  end;
3) Thank you for compiling a new hunspell. It should be renamed to 'hunspelldll.dll', and some changes must be made in the source code to support it. I'll upload a changed version soon.