|
From: | Ethan Bradford |
Subject: | Re: [Aspell-user] Can I get "edit distance" for the suggestions? |
Date: | Tue, 25 Apr 2006 18:40:33 -0700 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |