Wednesday, February 9, 2011
Start a creative pursuit
========================================================================================================================== Olivier R. pisze: Hi, Marcin Miłkowski a écrit : if I'm not wrong, by default, the number of single letter replacement defines the order of suggestions here. Now, two letters would have to be changed in case a. to get the correct version; in case b. it's only one letter. This seems to explain all other cases as well. In all the cases of example 1, the second e with an accent must be changed in an e with no accents, and one r is missing. That makes two letters. Correct spelling: déterrer Hunspell suggestions: détérer --> déterrer is not suggested (8th position if line KEY removed) détèrer --> déterrer is at 4th position détêrer --> déterrer is at 3rd position détërer --> déterrer is at 2nd position ^^ || |`-----> one r is missing | `------> should be e In all these cases, two letters must be replaced. In terms of Levenshtein distance (the standard measure of the difference between strings), the correct form is actually a "worse" suggestion than other forms that require a change of only one letter. Of course, the space of corrections is not as uniform as Levenshtein suggests, so some changes should be given preference to others. I don't know how to do that besides changing the TRY line and REPs. I'm only saying that it looks as if the Levenshtein distance was used but there surely is another way to find better suggestions. Anyone? Regards Marcin --------------------------------------------------------------------- To unsubscribe, e-mail: dev- ... @lingucomponent.openoffice.org For additional commands, e-mail: dev- ... @lingucomponent.openoffice.org