diff --git a/alRawTextCleaning.py b/alRawTextCleaning.py index 9cd133fac231f638a6023801867684f52a06ef68..a31d875adab3926104347e8c5dbf5cea9b18c0dc 100644 --- a/alRawTextCleaning.py +++ b/alRawTextCleaning.py @@ -27,7 +27,7 @@ def altok_escape_xml(s, do_not_create_XML_special_tokens = 0): s = re.sub(r"(?=\\)(\{[^\{}]*)<", r"\1<", s) s = re.sub(r"(?=\\)(\{[^\{}]*)>", r"\1>", s) - if do_not_create_XML_special_tokens == 0: + if not do_not_create_XML_special_tokens: if re.search(r"_XML", s): s = re.sub(r"\{([^{}]+)\} _XML", lambda x : "{" + _double_whitespaces(x.group(1)) + "} _XML", s) return s