Unhammer I think I've implemented this in:
https://github.com/apertium/apertium/pull/102 . If it looks good I can
implement in interchunk and postchunk as well.

The blanks are stored as a queue and output in available <b/>s in the rule
output. If any are remaining they're output after the rule output.

*तन्मय खन्ना *
*Tanmai Khanna*


On Thu, Aug 27, 2020 at 3:05 PM Kevin Brubeck Unhammer <unham...@fsfe.org>
wrote:

> Tanmai Khanna <khanna.tan...@gmail.com>
> čálii:
>
> > So what I'll try to do, is after the blanks are collected, lets say X is
> > the number of source LUs in the pattern and Y is the number of output
> LUs.
> > If X = Y then we can keep them in the same place, if X < Y, then we can
> > keep them in the first X gaps the rest can be spaces or whatever the user
> > denotes. If X > Y, then we can print the first Y blanks and then flush
> the
> > remaining. After this the <b pos> option will become useless. Does that
> > sound good?
>
> By "gaps" do you mean where the rule is outputting a <b/>? So if input
> is "a<br/>b c" and a rule matching that has two <b/>'s in its <out>, the
> <br/> gets output on the first <b/> and then on the second <b/> we get
> a regular space. If the rule has three <b/>'s, the third one is also
> a regular space. If the rule has no <b/>'s, the <br/> gets output after
> the rule output. That would be nice (though I could also live with the
> <br/> always ending up after the rule as long as I never have to think
> about pos="…")
> _______________________________________________
> Apertium-stuff mailing list
> Apertium-stuff@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/apertium-stuff
>
_______________________________________________
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to