<commit_before>//! Serialize `Script`s to `xml`

/// Serialize the given `Script` into a `xml`
///
/// Serialize the given `Script` into the following `xml` format and write
/// it to the given `Writer`.
///
/// # Example
///
/// ```xml
/// <?xml version="1.0" encoding="UTF-8"?>
/// <script>
///   <scene>
///     <location place="Snowy Landscape" type="external">
///       <direction page="1">Swirls of snow obscure the rocky formations of a mountain (...)</direction>
///       <direction page="1">Five ragged men attack a young girl, SINTEL, (...)</direction>
///       <!-- (...) -->
///       <dialog character="Shaman" page="1">You’re lucky to be alive. (...)</dialog>
///       <direction page="2">Finally she collapses into the snow, her eyes shut tight.</direction>
///       <direction page="2">BLACK</direction>
///       <dialog character="Shaman" mode="VO" page="2">Here, take a sip.</dialog>
///     </location>
///   </scene>
///   <!-- (...) -->
/// </script><commit_msg>Add in-dialog directions to xml output example<commit_after>//! Serialize `Script`s to `xml`

/// Serialize the given `Script` into a `xml`
///
/// Serialize the given `Script` into the following `xml` format and write
/// it to the given `Writer`.
///
/// # Example
///
/// ```xml
/// <?xml version="1.0" encoding="UTF-8"?>
/// <script>
///   <scene>
///     <location place="Snowy Landscape" type="external">
///       <direction page="1">Swirls of snow obscure the rocky formations of a mountain (...)</direction>
///       <direction page="1">Five ragged men attack a young girl, SINTEL, (...)</direction>
///       <!-- (...) -->
///       <dialog character="Shaman" page="1">You’re lucky to be alive. (...)</dialog>
///       <direction page="2">Finally she collapses into the snow, her eyes shut tight.</direction>
///       <direction page="2">BLACK</direction>
///       <dialog character="Shaman" mode="VO" page="2">
///           <direction>(To Sintel)</direction>
///           Here, take a sip.
///       </dialog>
///     </location>
///   </scene>
///   <!-- (...) -->
/// </script>
{'fraction_non_alphanumeric': 0.2296260786193672, 'fraction_numerical': 0.00862895493767977, 'mean_word_length': 2.3392, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 2, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 11}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3731367', 'n_tokens_mistral': 631, 'n_tokens_neox': 612, 'n_words': 193}