2010/7/11 Jacob Nordfalk <[email protected]>:
>
>
> 2010/7/11 Jimmy O'Regan <[email protected]>
>>
>> On 11 July 2010 22:22, Jacob Nordfalk <[email protected]> wrote:
>> >
>> >
>> > 2010/7/11 Jimmy O'Regan <[email protected]>
>> >
>> >>
>> >>  <section-rules>
>> >>    <rule>
>> >>      <pattern>
>> >>        <pattern-item n="adj"/>
>> >>        <pattern-item n="n"/>
>> >>      </pattern>
>> >>      <action>
>> >>        <exception>
>> >>          <test>
>> >>            <equal caseless="yes">
>> >>              <clip pos="2" side="sl" part="lem"/>
>> >>              <lit v="bar"/>
>> >>            </equal>
>> >>          </test>
>> >>        </exception>
>> >
>> > Now, I do understand why you chose that way of writing it (its the
>> > easiest
>> > way to implement), but if we adopt <exception> I it would make more
>> > sense to
>> > make the exception a part of the <pattern> element, like this:
>>
>> Pattern exceptions is what LanguageTool uses, and there's scope for
>> *also* having that, but I'm interested in runtime-based exceptions
>> that have access to all matched words, to check for agreement.
>
> I think we should stick to runtime exceptions, and not consider pattern
> exceptions at all.
> My point is that for transfer rule developers it would make much more sense
> to percieve it as 'an exception to the pattern'. Now it looks like 'an
> exception to an action', which doesent make too much sense.

You could call it "continue" instead? (Or would that be even more confusing…)

I can imagine scenarios where having it in the action would make the
rule a bit more compact, eg.

<call-macro n="set_some_important_variables"><with-param pos="1"…
<exception><test><equal><var n="important"/><lit v="fail"/></equal>…
<out><var n="important"/></out>

--
Kevin Brubeck Unhammer

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to