Files
claude-config/bin/agent_cycle/quotes.py
T
2026-11-18 16:21:35 +01:00

13 lines
551 B
Python

"""What counts as a quote: whether a text holds a passage the judge quotes from the transcript, the premises, the records or a human's line."""
def verbatim(quote: str, text: str) -> bool:
"""Whether text holds the judge's quote word for word, once plain strips emphasis and reflows whitespace in both."""
quoted = plain(quote)
return quoted != "" and quoted in plain(text)
def plain(text: str) -> str:
# The judge drops markdown emphasis and reflows whitespace when it quotes.
return " ".join(text.replace("*", "").replace("_", "").split())