Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add divvunspell support to Enchant #23

Open
snomos opened this issue Nov 22, 2020 · 6 comments
Open

Add divvunspell support to Enchant #23

snomos opened this issue Nov 22, 2020 · 6 comments
Assignees

Comments

@snomos
Copy link
Member

snomos commented Nov 22, 2020

Filed here in lack of a better place:

We would like to have support for divvunspell in most Linux distros, and the easiest way to do that is to add support for divvunspell to Enchant, in the same way as (lib)voikko is supported, cf https://github.com/AbiWord/enchant/issues/259.

The arguments for doing this are as follows:

  • divvunspell is faster than hfst-ospell
  • we get support for the bhfst format (only supported by divvunspell)
  • we get consistent suggestion behavior across all platforms we support
@flammie
Copy link
Contributor

flammie commented Jan 4, 2021

What's the current status of the things in examples / support? my first thought was to build on that based on some existing enchant provider code, it should be mostly the same, but the examples/example.cpp doesn't compile like so:

clang++ -std=c++11 -o example -Isupport/ -Ltarget/release -ldivvunspell examples/example.cpp
In file included from examples/example.cpp:3:
/usr/local/include/divvunspell.hpp:44:5: error: unknown type name 'speller_t'
    speller_t* handle;
    ^
/usr/local/include/divvunspell.hpp:96:5: error: unknown type name 'speller_t'
    speller_t* handle = speller_archive_new(path.c_str(), &error);
    ^
/usr/local/include/divvunspell.hpp:96:25: error: use of undeclared identifier 'speller_archive_new'
    speller_t* handle = speller_archive_new(path.c_str(), &error);
                        ^
/usr/local/include/divvunspell.hpp:100:9: error: use of undeclared identifier 'speller_str_free'
        speller_str_free(error);
        ^

@snomos snomos changed the title Add divvusnpell support to Enchant Add divvunspell support to Enchant Jan 4, 2021
@bbqsrc
Copy link
Member

bbqsrc commented Jan 7, 2021

This example code predates the existence of the BHFST file format, so the headers are not synched. I can fix this if it's a priority @snomos?

@snomos
Copy link
Member Author

snomos commented Jan 7, 2021

It is not a high priority right now, but would be good to get going within the next couple of months. What is the expected time needed to fix the example code, @bbqsrc?

@bbqsrc
Copy link
Member

bbqsrc commented Jan 7, 2021

Hmm. @flammie: you should be able to take this file and just use it: https://github.com/divvun/divvunspell-sdk-swift/blob/master/DivvunSpell/Classes/divvunspell.h

If that works, we can just update the example and move on with our lives. 😄

@flammie
Copy link
Contributor

flammie commented Jan 8, 2021

Hmm. @flammie: you should be able to take this file and just use it: https://github.com/divvun/divvunspell-sdk-swift/blob/master/DivvunSpell/Classes/divvunspell.h

If that works, we can just update the example and move on with our lives.

You mean it should work with current https://github.com/divvun/divvunspell/blob/main/divvunspell/examples/example.cpp or? Cause it still misses the speller_t for example. Or maybe the plain C version is easier?

@bbqsrc
Copy link
Member

bbqsrc commented Jan 8, 2021

Yeah use the plain C version. If you want to add C++ functionality, you can wrap the C header with a C++ API that you prefer. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants