You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When converting semantic representations with delphin convert, the default method has no intra-representation indentation but each representation is separated by a newline. Formats with header and footer elements, such as XML and JSON, always include these elements. This behavior is changed with the --indent option as follows:
--indent 0 : same as default, I think
--indent (no value) : default indentation for the codec
--indent N where N > 0 : insert newlines where appropriate and indent N spaces if the format allows it
There are at least 2 potentially useful alternatives that are not accessible:
no newlines at all (a single stream)
no header or footer
The problem with adding a single option for these (e.g., --stream and --lines) is that it isn't clear if that's for writing or for reading. I don't think it matters much for the former, but the latter will currently break for XML and JSON if the root elements are not there. If the codecs were robust to the absence of a root element then the options could pertain only to writing.
The text was updated successfully, but these errors were encountered:
Maybe an easier way to deal with this is to allow a suffix on a codec name like -lines (e.g., dmrsjson-lines) which assumes each line is a full representation. For streaming, I can either change the default behavior so no newlines are printed if --indent is not given, or allow a special option like --indent=no. I'm concerned that the former might annoy some people or be considered a break in backward compatibility.
When converting semantic representations with
delphin convert
, the default method has no intra-representation indentation but each representation is separated by a newline. Formats with header and footer elements, such as XML and JSON, always include these elements. This behavior is changed with the--indent
option as follows:--indent 0
: same as default, I think--indent
(no value) : default indentation for the codec--indent N
where N > 0 : insert newlines where appropriate and indent N spaces if the format allows itThere are at least 2 potentially useful alternatives that are not accessible:
The problem with adding a single option for these (e.g.,
--stream
and--lines
) is that it isn't clear if that's for writing or for reading. I don't think it matters much for the former, but the latter will currently break for XML and JSON if the root elements are not there. If the codecs were robust to the absence of a root element then the options could pertain only to writing.The text was updated successfully, but these errors were encountered: