(self, pattern)
| 13 | self.executor = ThreadPoolExecutor() |
| 14 | |
| 15 | def compile_pattern(self, pattern): |
| 16 | with warnings.catch_warnings(): |
| 17 | warnings.simplefilter("ignore", category=DeprecationWarning) |
| 18 | try: |
| 19 | return re.compile(pattern) |
| 20 | except re.error as e: |
| 21 | print(f"Regex compilation error for pattern: {pattern[:50]}... -> {e}") |
| 22 | return None |
| 23 | |
| 24 | def load_patterns(self, jsonl_file): |
| 25 | """Load all regex patterns from a JSONL file.""" |