<commit_before>#!/usr/bin/env python
"""Usage: ./replace.py FILE..
Replaces some defined patterns.
"""

import re
import sys
import logging

SUBS = [
    (re.compile(r"i:help\s*>"), "i:tooltip>"),
    (re.compile(r"i:comment\s*>"), "i:help>"),
    ]<commit_msg>i#2050 - repared a regex for layoutExt() removal.<commit_after>#!/usr/bin/env python
"""Usage: ./replace.py FILE..
Replaces some defined patterns.
"""

import re
import sys
import logging

# For layoutExt() removal.
SUBS = [
    (re.compile(r"(?m)^\s*return\s*XmlParser::layoutExt\(\$this(,\s*true)?\);\s*^"), ""),
    ]

# For i:comment renaming.
SUBS = [
    (re.compile(r"i:help\s*>"), "i:tooltip>"),
    (re.compile(r"i:comment\s*>"), "i:help>"),
    ]
{'fraction_non_alphanumeric': 0.23430962343096234, 'fraction_numerical': 0.005578800557880056, 'mean_word_length': 4.020979020979021, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '6368949', 'n_tokens_mistral': 286, 'n_tokens_neox': 274, 'n_words': 54}