#1 2014-02-17 23:29:27

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

Spell checking

Could SQLite's Spellfix1 extension support be added to the roadmap? Not sure of the best way to implement it. An alternative could be to use hunspell.
I guess it has more features but would be more work to implement and uses much more RAM as it seems to use an in-memory hash table.

Offline

#2 2014-02-18 10:39:30

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Spell checking

AFAIK since SpellFix1 is a loadable extension, you can use it right away with the existent code.

BTW we did make our own wrapper for HunSpell, some years ago.
See http://synopse.info/fossil/finfo?name=S … lCheck.pas
smile

Offline

#3 2018-01-30 12:38:50

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: Spell checking

Hi ab,

How to load a sqlite loadable extension with mORMot? I tried executing

select load_extension("spellfix1");

but got an error: "Error SQLITE_ERROR (1) [select load_extension("spellfix1");] using 3.22.0 - no such function: load_extension, extended_errcode=1".

And according to the sqlite3 documentation (https://sqlite.org/loadext.html#compili … _extension), an extension is actually a .DLL, does it mean I have to download the sqlite c source code, install Microsoft VC, and compile the extension manually?

Thanks.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#4 2018-01-30 12:55:01

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: Spell checking

BTW, I want to use the following SQLITE extensions smile
- the 'dbdump' extension.
  for dumping data to disk and then restoring back to the db.

- the spell check extension: http://www.sqlite.org/spellfix1.html

- the csv extension: https://sqlite.org/csv.html
  For accessing a csv disk file through the SQL interface, wow!

- the carray extension: https://www.sqlite.org/carray.html
  I assume I can pass an delphi array to the sqlite engine?

- the zipfile extension: http://sqlite.org/zipfile.html
  For reading a disk .zip file.

- the appendvfs extension:https://sqlite.org/src/file/ext/misc/appendvfs.c
  For reading a sqlite db appended to the end of a .exe file.

Any instruction for using these extensions will be appreciated.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#5 2018-01-30 14:05:40

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Spell checking

Yes, as stated in the beginning of our sqlite3.c amalgamation file, we didn't include extension loading with the static linked .o/.obj.

You will have to recompile it, or use an external .dll - we provide one for 64bit Windows, and the other is available from http://sqlite3.org

Offline

#6 2018-01-30 15:26:59

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: Spell checking

Hi ab, after searching for "sqlite3.c" in the pdf document, I have found the relative info, thanks.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#7 2018-01-30 15:51:25

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: Spell checking

Hi ab,

If it makes sense, I'd suggest to include the "load_extension()" in the engine compilation if it doesn't add to much size to the resulting .obj file, you know, allow using those powerful Sqlite loadable extensions is a plus to mORMot smile


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

Board footer

Powered by FluxBB