Jonathan Washington
<jonathan.n.washing...@gmail.com> čálii:

> Hi all,
>
> I understand that -z was added to a number of Apertium and Apertium-related
> programs, allowing them to continue to accept input and simply flush
> buffers when a null character is encountered.
>
> Question 1.  Is it right that Apertium itself does not follow this
> behaviour?  To use an existing mode with this behaviour, one would have to
> add -z to each relevant command (as done in APy -
> https://github.com/apertium/apertium-apy/blob/master/apertium_apy/utils/translation.py#L145
> ), including wrapping in the appropriate de- and reformatters?

If you mean the shell script /usr/bin/apertium, then it is correct that
it does not add -z anywhere.

> Question 2.  What sort of modification would need to be made to a
> miscellaneous program in the pipeline for it to behave this way?  Can
> anyone point to an example diff of this sort of modification?

https://github.com/khannatanmai/apertium-anaphora/commit/10ba079536c12e37d164c96804afbd3b2d568cf6
is one way, though I think more tools use the *_wrapper_null_flush idiom
as in
https://github.com/apertium/apertium/blob/master/apertium/transfer.cc#L1889

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to