Skip= "6"

Hello

What does skip=“6” do in the following rule please?

Thanks

<rule id="REASON_IS_BECAUSE" name="'the reason... is because'">    
            <pattern>
                <token>the</token>
                <token skip="6">reason</token>
                <marker>
                    <token>is</token>
                    <token>because</token>
                </marker>
            </pattern>
            <!--  or &lt;suggestion&gt;because&lt;/suggestion&gt; -->
            <message>Probably an incorrect phrase. Use 'the reason <suggestion>is that</suggestion>'.</message>
            <short>Grammatical problem</short>
            <example correction="is that" type="incorrect">The reason we were late <marker>is because</marker> there was an accident.</example>
            <example type="correct">The reason we were late <marker>is that</marker> there was an accident.</example>
        </rule>

On So 04.11.2012, 12:19:05 you wrote:

What does skip=“6” do in the following rule please?

It optionally skips tokens, see
http://www.languagetool.org/development/#skip

Regards
Daniel


http://www.danielnaber.de

mcruvHello

I am actually already reading the page you sent me.

But what I don’t understand is the “6” in skip 6

Does it simply mean to skip 6 tokens ?

If yes, I can’t understand which tokens are being skipped

Thanks

On So 04.11.2012, 22:42:47 you wrote:

Does it simply mean to skip 6 tokens ?

Yes, or rather: up to 6.

If yes, I can’t understand which tokens are being skipped

Those directly after the token with the skip attribute.

Regards
Daniel


http://www.danielnaber.de

Hello

Thanks but in the above example, there is no skip attribute specified

This just means skip up to 6 tokens before the token ‘reason’ then?

Thanks