Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions openagent_eval/metrics/nli/claim_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Loading