delphin.mrs.dmrx¶
DMRX (XML for DMRS) serialization and deserialization.
-
delphin.mrs.dmrx.
dump
(destination, ms, single=False, properties=True, pretty_print=False, **kwargs)[source]¶ Serialize Xmrs objects to DMRX and write to a file
Parameters: - destination – filename or file object where data will be written
- ms – an iterator of Xmrs objects to serialize (unless the
single option is
True
) - single – if
True
, treat ms as a single Xmrs object instead of as an iterator - properties – if
False
, suppress variable properties - pretty_print – if
True
, add newlines and indentation
-
delphin.mrs.dmrx.
dumps
(ms, single=False, properties=True, pretty_print=False, **kwargs)[source]¶ Serialize an Xmrs object to a DMRX representation
Parameters: - ms – an iterator of Xmrs objects to serialize (unless the
single option is
True
) - single – if
True
, treat ms as a single Xmrs object instead of as an iterator - properties – if
False
, suppress variable properties - pretty_print – if
True
, add newlines and indentation
Returns: a DMRX string representation of a corpus of Xmrs
- ms – an iterator of Xmrs objects to serialize (unless the
single option is