Hi

I have just added a new sanity check on XML rules
when running "mvn test" to detect useless exceptions
(exceptions that can't match) as in:

    <token>foo<exception>bar</exception></token>

Often this means that scope="previous" or skip="..." was
forgotten, or the exception is useless. It currently detects
problems in Chinese and Spanish rules:

The Chinese rule: YU1_YU2:2 exception in token [2] seems useless. Did
you forget skip="..." or scope="previous"?
The Chinese rule: DA_TAI:1 exception in token [2] seems useless. Did
you forget skip="..." or scope="previous"?
The Chinese rule: MING_WU:1 exception in token [1] seems useless. Did
you forget skip="..." or scope="previous"?
The Chinese rule: MING_WU:2 exception in token [2] seems useless. Did
you forget skip="..." or scope="previous"?
The Chinese rule: MING_WU:3 exception in token [1] seems useless. Did
you forget skip="..." or scope="previous"?
The Chinese rule: BA_BO:7 exception in token [1] seems useless. Did
you forget skip="..." or scope="previous"?
The Chinese rule: DAI_FA:1 exception in token [1] seems useless. Did
you forget skip="..." or scope="previous"?

The Spanish rule: TE2:11 exception in token [1] seems useless. Did you
forget skip="..." or scope="previous"?


It could be improved further later.  It currently does not
detect useless exceptions as in...

<token regexp="yes">foo|bar<exception>foobar</exception></token>

... and such useless exception does happen. See:

http://languagetool-user-forum.2306527.n4.nabble.com/What-does-the-XML-tag-exception-mean-tp4641015.html

Regards
Dominique

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&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