Thanks a lot, Jaume.
I've earlier managed the first one earlier (with
a <suggestion/>, but the correction leaves 2
spaces. I've ran out of ideas how to remove the space before the token.
Your second option solves the problem. This also
helped me to understand the match tag. Gracias!
This is a better way to learn. Reading
http://languagetool.org/development/ burns up my poorly equipped cpu!
kb
Jaume OrtolĂ i Font wrote thus at 03:43 PM 07-09-13:
Hi,
I see two ways:
An empty suggestion (that can be confusing for the user):
<rule default="off" id="ACTUALLYREALLY"
name="Possible needless emphasis: actually/really">
<pattern>
<token regexp="yes">(?-i)actually|really</token>
</pattern>
<message>Consider if the word is (actually)
necessary. Too much emphasis mars good writing.</message>
<suggestion></suggestion>
<short>Possible needless emphasis</short>
<example type="incorrect"
correction="">This is <marker>actually</marker> bad.</example>
<example type="correct">This is bad.</example>
</rule>
Or this (better):
<rule default="off" id="ACTUALLYREALLY"
name="Possible needless emphasis: actually/really">
<pattern>
<token regexp="yes">(?-i)actually|really</token>
<token/>
</pattern>
<message>Consider if the word is (actually)
necessary. Too much emphasis mars good writing.</message>
<suggestion><match no="2"/></suggestion>
<short>Possible needless emphasis</short>
<example type="incorrect"
correction="bad">This is <marker>actually bad</marker>.</example>
<example type="correct">This is bad.</example>
</rule>
Regards,
Jaume
2013/9/7 Kumara Bhikkhu
<<mailto:[email protected]>[email protected]>
Dear friends,
How do I modify this so that in LibO the dialog
box would allow the user to quickly delete the word with the Correct button?
<rule default="off" id="ACTUALLYREALLY"
name="Possible needless emphasis: actually/really">
<pattern>
<token regexp="yes">(?-i)actually|really</token>
</pattern>
<message>Consider if the word is (actually)
necessary. Too much emphasis mars good writing.</message>
<short>Possible needless emphasis</short>
<example type="incorrect">This is
<marker>actually</marker> bad.</example>
<example type="correct">This is bad.</example>
</rule>
kb
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Languagetool-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-devel