-
Notifications
You must be signed in to change notification settings - Fork 56
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
expose suggestion scores #524
Conversation
modules/speller/default/suggest.cpp
Outdated
// The internal, C++ version of the external Suggest/AspellSuggest | ||
// struct. I don't use that struct because I want the convenience | ||
// of automatically allocated space for the strings. | ||
typedef vector<pair<String,int> > NearMissesFinal; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment from #365 (comment)
A "String" as a struct member will behave in the exact
same fashion of a "String" in a pair. Please use a struct to allow
for the inclusion of additional information in the future.
but I'm not clear on the scope of this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use something like:
struct Suggestion {
String word;
int score;
};
typedef vector<Suggestion> NearMissesFinal;
And then fix any compile errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added. I thought that the comment meant to reuse the existing AspellSuggestion struct and was more involved.
When I apply this patch and link with -lm ../headers/libaspell.so.15.2.0 it compiles fine, but at runtime I get: Would you have any idea on how to solve this? |
@robvanderg on Ubuntu I build with:
Try the |
I Did this:
Then I use interfaces/cc/aspell.h and .libs/libaspell.so.15.1.5 in my c++ code:
It works fine with the original aspell. But this one only compiles, during runtime I still get: |
The patch includes all 3 commits in sequence (just scroll down) |
Patch attached. This works for me on Ubuntu and OS X (with one additional OS X change). |
I still get the same error, after I patched a clean download. I attached a minimal example. |
|
The export did the trick; thank you so much for your help! |
Note that
|
Closing this in favor of #567. |
Updated version of Ethan Bradford's patch from #365
Renamed to
suggest_plus
as suggested at #365 (comment)