On Fri, 31 Mar 2006, Ethan Bradford wrote:
I'm mystified as to how the definition of *AspellStringEnumeration* is
hidden from us, so I can't peek inside of that. It seems obvious from
the
outside that edit distance (i.e. the # of changes necessary to get from
the
checked word to a proposed suggestion) is used to sort the results
presented
to the user. I'd like to use outside information to sort the results
with
equal edit distance w.r.t. eachother. So how do I get the edit
distance?
The "edit-distance" is not stored in AspellStringEnumeration. It is only
stored internally inside data structures in suggest.cpp. Also its not a
simple edit-distance function that is used to rank the suggestions, but a
combination of several factors, most of them being closely related to an
edit-distance. In the future other factors, such as frequency, may be
used to rank the suggestions. The more correct term to use is "score".
As far as making the score available outside of suggest.cpp, I am not
against it. I just haven't gotten around to it. I will gladly accept a
patch to this effect, however I will be fairly picky about how it is done.
For example I won't accept something that hacks AspellStringEnumeration to
include the score. A separate data structure should be used. Also,
backwards compatibility will need to be maintained.