aspell-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Aspell-user] Can I get "edit distance" for the suggestions?


From: Ethan Bradford
Subject: Re: [Aspell-user] Can I get "edit distance" for the suggestions?
Date: Tue, 25 Apr 2006 18:40:33 -0700

So I should clone common/string_enumeration.* and string_list.* with "suggestion" instead of string, right?  Those files are in the common directory.  Do the suggestion list/enumeration utilities belong there, or closer to modules/speller/default
/suggest.cpp?


On 4/19/06, Kevin Atkinson <address@hidden> wrote:
On Wed, 19 Apr 2006, Ethan Bradford wrote:

> On 4/19/06, Kevin Atkinson <address@hidden> wrote:
>>
>> On Tue, 18 Apr 2006, Kevin Atkinson wrote:
>>
>>> On Tue, 18 Apr 2006, Ethan Bradford wrote:
>>>
>>>> On 4/18/06, Kevin Atkinson <address@hidden> wrote:
>>>>>
>>>>> On Tue, 18 Apr 2006, Ethan Bradford wrote:
>>>>>
>>>>>> Here's a proposal for the API:
>>>>>>  We add the type AspellIntEnumeration (or maybe a better name --
>>>>> lower-case
>>>>>> L next to cap I is ugly, but it would be nice if it was like
>>>>>> AspellStringEnumeration).
>>>>>>  We add a call to extract that from an AspellWordList:
>>>>>>     AspellIntEnumeration * scores =
>>>>> aspell_word_list_scores(suggestions);
>>>>>
>>>>> I was more thinking of using a struct something like
>>>>>    struct Suggestion {
>>>>>       const char * word;
>>>>>       int word_len;
>>>>>       int score;
>>>>>    }
>>>>>    and new methods to go along with it....
>>>>
>>>> Is there an iterator to go through a list of these, like
>>>> AspellStringEnumeration?  And does AspellWordList contain all the data
>>>> necessary to create that list?
>>>
>>> No you would need to create one just like the AspellIntEnumeration.
>>
>> And to answer the second question AspellWordList won't contain the
>> necessary info.   You will need:
>>
>>    AspellSuggestionList
>>    AspellSuggestionEnumeration
>>
>> and methods to get these classes
>
>
> I'm proposing to add the necessary information to AspellWordList.  Since its
> contents aren't directly accessed now, that wouldn't affect back
> compatibility.  That would allow the paths for getting the word list with
> and without score information to diverge as late as possible, i.e. after the
> aspell_speller_suggest call.

Except that Aspell Word List is used for other things in addition to
aspell_speller_suggest.  AspellWordList is meant as a simple WordList, not
a WordList plus extra info for suggest, extra info for foo, etc.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]