<commit_before>echo 'Please wait...'

sed -ri 's/^[ \t]*(<\/?category)/ \1/' $@
sed -ri 's/^[ \t]*(<\/?(rulegroup|!DOCTYPE))/  \1/' $@
sed -ri 's/^[ \t]*(<\/?(rule |rule>|!--|!ENTITY))/    \1/' $@
sed -ri 's/^[ \t]*(<\/?(marker|suggestion|equivalence|and|or))/        \1/' $@
sed -ri 's/^[ \t]*(<\/?(antipattern|pattern|regexp|filter|message|url|short|example|disambig|unification))/      \1/' $@
sed -ri 's/^[ \t]*(<\/?(token|unify))/          \1/' $@
sed -ri 's/^[ \t]*(<\/?(exception|feature))/            \1/' $@

echo $@' indented'<commit_msg>[pt] indentation script improvement<commit_after>echo 'Please wait...'

sed -ri 's/^[ \t]*(<\/?category)/ \1/' $@
sed -ri 's/^[ \t]*(<\/?(rulegroup|!DOCTYPE))/  \1/' $@
sed -ri 's/^[ \t]*(<\/?(rule |rule>|!--|!ENTITY))/    \1/' $@
sed -ri 's/^[ \t]*(<\/?(marker|suggestion|equivalence|and|or))/        \1/' $@
sed -ri 's/^[ \t]*(<\/?(antipattern|pattern|regexp|filter|message|url|short|example|disambig|unification))/      \1/' $@
sed -ri 's/^[ \t]*(<\/?(token|unify))/          \1/' $@
sed -ri 's/^[ \t]*(<\/?(exception|feature))/            \1/' $@

sed -ri 's/(<token[^>]*?)><\/token>/\1\/>/' $@
sed -ri 's/[ \t]+\r?$/\r/' $@

echo $@' indented'
{'fraction_non_alphanumeric': 0.3528428093645485, 'fraction_numerical': 0.01254180602006689, 'mean_word_length': 2.6944444444444446, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '6350307', 'n_tokens_mistral': 561, 'n_tokens_neox': 499, 'n_words': 91}