Skip to content

Conversation

@kevina
Copy link
Member

@kevina kevina commented Aug 9, 2019

This adds the following methods/functions:

AspellSuggestions * aspell_speller_suggestions(AspellSpeller *, const char * word, int word_size, void * unusued);

const char * * aspell_suggestions_words(AspellSuggestions *, unsigned int * len);

/* Returns the normalized scores.  The values are between 0 and 1 inclusive
 * where higher numbers indicate a better match.  The exact values may not
 * be stable between releases.  The score is currently 1/(d+1) where d is
 * the distance as given 'distances' method, however this may change in
 * future released.  This number may also incorporate other information,
 * such as the frequency, in future released. */
double * aspell_suggestions_normalized_scores(AspellSuggestions *, unsigned int * len);

/* Return the distances between the words and the correct spelling.  This
 * number is closely related to the edit distance of the word where each
 * edit is around 1.0.  Values less then 0.5 represent a typo or otherwise
 * very good match.  Values less then around 1.2 represent a good match. */
double * aspell_suggestions_distances(AspellSuggestions *, unsigned int * len);

And also add the --show-scores option to show the scores with the suggestion in aspell pipe mode.

Replaces #524.

@kevina kevina mentioned this pull request Aug 9, 2019
@kevina kevina modified the milestones: 0.60.7, 0.60.8 Aug 9, 2019
@kevina kevina force-pushed the expose-scores branch 2 times, most recently from fda58f8 to 9f32997 Compare August 24, 2019 03:40
@kevina kevina force-pushed the expose-scores branch 2 times, most recently from 5852d01 to c498cd9 Compare September 8, 2019 03:09
@kevina kevina modified the milestones: 0.60.8, 0.62 Sep 24, 2019
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

Successfully merging this pull request may close these issues.

2 participants