Daniel Naber wrote thus at 02:53 AM 28-09-13:
On 2013-09-27 06:41, Kumara Bhikkhu wrote:
> It's also not true that placing them as a rulegroup makes a
> difference in this case.
It does for me: one match gets filtered out. Are you sure you left
LibreOffice after making a change to the grammar.xml file?
Yes, only then is LT reloaded and the difference noticed.
The benefit of rulegroup is lumping rules as one option.
Anyway, here's what I've done:
<rulegroup id="WHETHER" name="Shorten to 'whether'">
<rule>
<pattern>
<token>the</token>
<token>question</token>
<token>as</token>
<token>to</token>
<token>whether</token>
<token>or</token>
<token>not</token>
</pattern>
<message>Shorten '\1 \2 \3 \4 \5 \6 \7'.</message>
<suggestion>\5</suggestion>
<suggestion>\5 \6 \7</suggestion>
<suggestion>\3 \4 \5</suggestion>
<suggestion>\1 \2 \5</suggestion>
<suggestion>\3 \4 \5 \6 \7</suggestion>"
<short>Wordiness</short>
<example type="incorrect"><marker>The question as to whether or
not</marker> it is difficult is not our concern.</example>
<example type="correct">Whether it is difficult is not
our concern.</example>
</rule>
<rule>
<pattern>
<token>as</token>
<token>to</token>
<token>whether</token>
<token>or</token>
<token>not</token>
</pattern>
<message>Shorten "\1 \2 \3 \4 \5".</message>
<suggestion>\3</suggestion>
<suggestion>\3 \4 \5</suggestion>
<suggestion>\1 \2 \3</suggestion>
<short>Wordiness</short>
<example type="incorrect">We are not concern <marker>as to whether or
not</marker> it is difficult.</example>
<example type="correct">We are not concern whether it is
difficult.</example>
</rule>
<rule>
<pattern>
<token>as</token>
<token>to</token>
<token>whether</token>
</pattern>
<message>Shorten "\1 \2 \3" to just
"<suggestion>\3</suggestion>", or rephrase the sentence to avoid \1
\2.</message>
<short>Possible wordiness</short>
<example correction="whether" type="incorrect">As to
whether it is difficult, it is not our concern.</example>
<example type="correct">We are not concern whether it is
difficult.</example>
</rule>
<rule>
<pattern>
<token>whether</token>
<token>or</token>
<token>not</token>
</pattern>
<message>Perhaps you can shorten "\1 \2 \3" to just
"<suggestion>\1</suggestion>". It is correct though if you mean
'regardless of whether'.</message>
<short>Possible wordiness</short>
<example correction="whether" type="incorrect">What
the government decides to do depends on <marker>whether or
not</marker> the bill passes.</example>
<example type="correct">What the government decides to do
depends on whether the bill passes.</example>
</rule>
</rulegroup>
kb ------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Languagetool-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-devel