Upload processors.py with huggingface_hub
Browse files1232 unmodified lines6789from .operator import BaseFieldOperator2 unmodified linesreturn str(instance)# add_to_catalog(ToString('prediction'), 'processors', 'to_string')123452 unmodified lines891011121314151617181920212223import refrom .operator import BaseFieldOperator2 unmodified linesreturn str(instance)class RegexParser(BaseFieldOperator):"""A processor that uses regex in order to parse a string."""regex: strdef process(self, text):matches = re.findall(self.regex, text)return matches# add_to_catalog(ToString('prediction'), 'processors', 'to_string')
processors.py+14