Am 19.11.2010 um 08:49 schrieb Stephan Witt: > Am 19.11.2010 um 07:20 schrieb LyX Ticket Tracker: > >> #7043: "Add to personal dictionary" appears to do nothing >> -----------------------------+---------------------------------------------- >> Reporter: quietbritishjim | Owner: lasgouttes >> Type: defect | Status: new >> Priority: normal | Milestone: 2.0.0 >> Component: spell | Version: 2.0.0svn >> Severity: normal | Keywords: >> -----------------------------+---------------------------------------------- >> >> Comment(by stwitt): >> >> The menu item "Add to personal dictionary" *is available* >> when the cursor is on a misspelled word. >> That's true for all spell checker interfaces - >> aspell, hunspell, enchant and apple native. >> The menu item "Remove from personal dictionary" is available only for >> learned words. >> Only the apple native interface has a method "hasLearned(word)", AFAIK. >> Aspell provides a method to enumerate the learned words. So it can be done >> manually. > > After implementing hasLearned() for aspell I tried to add the remove() > implementation... and didn't find it in the aspell API. :( > > Ouch. One should never make assumptions... > > Google revealed this instead: > http://old.nabble.com/Using-aspell-programmatically-td28445298.html > > ========================================================== > Re: Using aspell programmatically > by Kevin Atkinson May 04, 2010; 11:29pm > On Tue, 4 May 2010, John P. Hartmann wrote: > >> On the programmatic front, I can add words to the dictionary by >> aspell_speller_add_to_personal. How do I remove a word from the >> dictionary? > > Sorry, this is currently unsupported. > > ========================================================== > > Now, we're in trouble.
It took me a while to make the investigation about the status quo. Here it is: We have support for different spell checker backends. All of them are able to check words, of course. But the capabilities with personal word lists differs horrible. The following table presents the results of my investigation. Feature | aspell | native (mac) | enchant | hunspell ======================================================== check | + | + | + | + suggest | + | + | + | + accept | + | + | + | + insert | + | + | o (2) | o (3) ispersonal? | o (1) | + | - | - remove | - | + | + | - Legend: + feature is supported - feature is not supported o there are limitations: 1) aspell has the interface to enumerate the personal word list. So it's possible to implement, I have a patch for LyX at hand. 2) The versions below 1.6.0 are truncating the personal word list on open - effectively no personal word list available after restart. 3) There is no persistent state for personal word lists. When I implemented the LFUN_SPELLING_ADD for apples spell checker I introduced LFUN_SPELLING_REMOVE because it was possible there and it looks strange to have the possibility to add a word to a personal dictionary without the option to remove it later. Enchant manages it's own personal word lists. There is some rumor on the net already to consolidate the spelling for the whole desktop. https://wiki.ubuntu.com/ConsolidateSpellingLibs I don't know how long it would last to get some result. How to proceed? The options I see: 1) leave it as it is. Add to personal dictionary with all backends and remove only for apples native spell checker. 2) act like enchant and manage the personal word list in LyX, at least for aspell and hunspell. 3) remove support for aspell and hunspell. That sounds a little bit aggressive. Please, if someone has any hint or opinion - I'd like to hear it. Stephan