From 0ea09ab9ad62d3f980edf6c914e0424130acc3c1 Mon Sep 17 00:00:00 2001 From: Muhamed Fazal PS Date: Wed, 15 Jul 2026 18:41:14 +0530 Subject: [PATCH] fix: remove dead _SIMPLE_PATTERNS regex (#75) --- openagent_eval/metrics/nli/claim_extractor.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/openagent_eval/metrics/nli/claim_extractor.py b/openagent_eval/metrics/nli/claim_extractor.py index d69ac1f..6ed2247 100644 --- a/openagent_eval/metrics/nli/claim_extractor.py +++ b/openagent_eval/metrics/nli/claim_extractor.py @@ -43,17 +43,6 @@ class ClaimExtractor: # Sentence-ending patterns _SENTENCE_SPLIT = re.compile(r'(?<=[.!?])\s+') - # Patterns that indicate a single claim - _SIMPLE_PATTERNS = re.compile( - r'^(?:' - r'(?:The|A|An)\s+\w+\s+(?:is|are|was|were)\s+' # "The X is Y" - r'|(?:It|This|That)\s+(?:is|are|was|were)\s+' # "It is Y" - r'|\w+\s+(?:has|have|had)\s+' # "X has Y" - r'|\w+\s+(?:can|could|will|would|should)\s+' # "X can Y" - r')', - re.IGNORECASE, - ) - def extract(self, answer: str) -> list[Claim]: """Extract atomic claims from an answer.