Hi all,

I have a simple idea how to implement anti-patterns that we talked about 
earlier on this list (see 
http://wiki.languagetool.org/xml-pattern-rule-extensions). The idea is 
to extend the current immunization by adding a simple parameter: a list 
of rule IDs, for which the immunization is supposed to work. The pattern 
rule matcher (and the rest of matchers) would simply check whether their 
own rule ID is on the list, and that would stop them from matching.

The only drawback is that we would store the antipatterns separately 
from the rules for which they apply but, on the other hand, we could 
apply them to several rules at the same time and save time and space 
loading them.

Of course, one can easily add the same code to the handlers of XML 
pattern rules, so that one could use the same construct, but it would be 
a little more complex, as we'd have to add these rules actually to the 
disambiguation rules for a given language (and implement disambiguation 
for all languages that want to use anti-patterns). Another possibility 
is to have the same code to immunize tokens for particular rules. Note 
however that if we want to share the same antipatterns among several 
rules in the same rulegroup, then it may be a little bit tricky.

What do you think? Adding a rule ID in current immunization rules seems 
very easy, and may do all the work we need.

Regards,
Marcin

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&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