On 12 July 2013 16:55, Mikel Forcada <[email protected]> wrote: > ..this is not the semantics I expected from macro calls. Is this a bug, or > is this the desired semantics? (I am copying Sergio Ortiz, as he implemented > this sometime in 2007 when we were doing Catalan→English for the Generalitat > de Catalunya). The official documentation we wrote at that time gives > examples about lexical unit handling in connection with agreement (e.g. fig > 3.36) but does not have examples with superblanks on them. >
IIRC, this is how it worked in Apertium 2, but something in the changes for Apertium 3 caused this to not work (and, I think, to segfault), so Sergio changed it. I didn't know him at the time, so I didn't ask about the details. As it is now, a macro that refers to <b> needs to have two consecutive <clip>s passed to it. > I expected calls to map positions (pos). If I call the macro with two > positions, i.e. > > <with-param pos="4"/> > <with-param pos="1"/> > > I was expecting that any reference to pos="1" in the macro referred to > pos="4" in the calling code and any reference to pos="2" referred to pos="1" > in the calling code, but I am not sure anymore. This is the case for anything that can be referred to using <clip>. > Which superblanks would be > made available to this macro? > If there are 4 <pattern-item>s it will segfault. > If this is a bug, I would appreciate it being chased down before I do a lot > of superblank management in apertium-eng-kaz. I need it, both in .t1x and in > .t2x because word order varies widely. > The real thing that should be changed here is that we can only pass <clip> to macros: in this case, you want to pass <b>, not <clip>, and while it's somewhat counterintuitive to have to pass two consecutive <clip>s to access the <b> between, IMO it's no less counterintuitive to pass <clip> when you want <b>. -- <Sefam> Are any of the mentors around? <jimregan> yes, they're the ones trolling you ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Apertium-stuff mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/apertium-stuff
