Thanks, Jaume. I did read about "SENT_START" (and "SENT_END") but didn't know how to apply it here. (Didn't think of "exception" though. Was a bit one-track mind with negate=yes.)

For one moment, after posting that mail, I had that same idea that it may mean an hidden/supposed element at the beginning of the sentence, but brushed it off. I though, "If that's so, it would have been called "START". :-)

Anyway, it works! Thanks.

Jaume Ortolà i Font wrote thus at 04:42 PM 26-09-13:
Hi,

you can do this:

    <pattern>
        <token><exception postag="SENT_START"/></token>
        <token regexp="yes">actually|really</token>
        <token/>
    </pattern>

A SENT_START token is never a "real" element (word, punctuation mark...), but it's always present in a sentence before the first word (or punctuation mark). In contrast, the SENT_END token is a linguistic element (the last word or punctuation mark in the sentece).

Regards,
Jaume Ortolà

2013/9/26 Kumara Bhikkhu <<mailto:[email protected]>[email protected]> I thought this would ignore occurrences of actually|really in the beginning of a sentence:

    <pattern>
        <token/>
        <token regexp="yes">actually|really</token>
        <token/>
    </pattern>

But it doesn't. How do I make the rule not flag when actually|really occurs in the beginning of a sentence?

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

Reply via email to