MCPcopy Create free account
hub / github.com/Topdu/OpenOCR / clean_label

Method clean_label

tools/data/native_size_dataset.py:652–656  ·  view source on GitHub ↗
(self, text)

Source from the content-addressed store, hash-verified

650 return re.sub(r'([\u4e00-\u9fff])\s*<\|sn\|>', r'\1' + rep_str, text)
651
652 def clean_label(self, text):
653 for rule in self.rules:
654 text = re.sub(rule[0], rule[1], text)
655 text = fix_diacritics_regex(text)
656 return text
657
658 def __getitem__(self, properties):
659

Callers 1

__getitem__Method · 0.95

Calls 1

fix_diacritics_regexFunction · 0.85

Tested by

no test coverage detected