W dniu 2014-01-08 21:07, Daniel Naber pisze: > On 2014-01-08 20:23, Marcin Miłkowski wrote: > >> Actually, this is because I made a change in the class >> AbstractCompoundRule - now it returns true in isSpellingRule(), which >> should be the case given the LocQualityIssueType. This makes red >> underlines to appear in the GUI (which I also made more consistent >> recently), but I think that the wiki testing filters out all spelling >> rules, so no compound rule is ever tested. Which is probably wrong. > > Indeed. All spelling rules have different ids, so the Wikipedia code > cannot easily disable them based on their id, that's why it's using the > isSpellingRule() method. > > I'm not sure if it makes sense for AbstractCompoundRule matches to be > underlined red. Sure, one can argue these are spelling mistakes, but a > lot of matches, even those from grammar.xml, can also be spelling > mistakes.
Yes, and I'd like to underline them in red as well. This is what happens in other grammar checkers - even complex spelling rules are underlined in red and the rest in green or blue. > And for many matches it's difficult to tell. So while the old > definition (red underline = "based on the built-in hunspell-based > spellchecker") is a very technical one, it's at least clear, while any > other definition of what makes up a spelling error seems to be rather > arbitrary. Or am I missing something? Well, we used isSpellingRule() for MorfologikSpellingRule from the beginning, so the technical meaning of the method was very soon modified. I think this method should be consistent with LocQualityIssueType. If the rule is reporting misspellings, then the rule is a spelling rule, and not returning true from the method means that there is an inconsistency. I admit that under this interpretation, we report the same kind of information twice, which basically makes isSpellingRule() redundant with respect to LocQualityIssueType. If you want to limit isSpellingRule() to hunspell-based spelling, we should refactor it as "isHunspellSpellingRule()" to make it clear. If you want to include Morfologik rules, let's refactor it to "isDictionaryBasedSpellingRule()". But even in this case, the ContractionSpellingRule for English would qualify. My suggestion would be to rename the method, and use localization quality issue type for setting the GUI colors. > >> Speaking of tokenization, I'd like to add more tokenizing characters to >> the generic word tokenizer - I added '*', '=' and '#' to the English >> word tokenizer because it helps to spell-check. These characters are >> not >> parts of standard words. But tests in German fail when I add '*' and >> '=', which is related to one of the whitespace rules. Could you look at >> it? I think these characters should not be treated as parts of words. > > I think the affected rule can easily be adapted to your change. Just > commit your change with the failing rule in grammar.xml commented out, > or even with failing tests, and I'll try to fix it. OK, will do. Regards, Marcin > > Regards > Daniel > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > Languagetool-devel mailing list > Languagetool-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/languagetool-devel > ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ Languagetool-devel mailing list Languagetool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-devel