W dniu 2014-07-27 20:23, Daniel Naber pisze:
> On 2014-07-27 11:20, Marcin Miłkowski wrote:
>
>> I think we should use simpleReplaceRule instead. I think I use it for
>> contractions already.
>
> The problem with that is that incorrectly used irregular verbs are often
> already detected by the spelling rule, it's just that its suggestion
> isn't helpful. If we add another rule we have two matches at the same
> word and the client won't know which one to use. So I guess the better
> suggestions either need to be added in the Java code of the rule, or by
> using replacement pairs?

For contractions, I simply added them to the list of words ignored by 
the speller, so that I get no matches for "couldnt" from the spelling 
rule. Then, the contraction rule matches "couldnt" and offers a proper 
correction.

Replacement pairs can be slower, as they add some overhead for searching 
suggestions. They are a hacky solution to a simple problem, which we can 
solve better with a simple replace rule.

Regards,
Marcin

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to