Skip to content
Closed
Show file tree
Hide file tree
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
16 changes: 12 additions & 4 deletions .agents/skills/do-web-doc-resolver/scripts/quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,12 @@ def _check_jargon(text_lower: str) -> bool:
"transform",
"supercharge",
]
jargon_count = sum(text_lower.count(signal) for signal in jargon_signals)
return jargon_count > THRESHOLD_JARGON
jargon_count = 0
for signal in jargon_signals:
jargon_count += text_lower.count(signal)
if jargon_count > THRESHOLD_JARGON:
return True
return False


def _check_frontmatter(text: str) -> bool:
Expand Down Expand Up @@ -115,8 +119,12 @@ def _check_anchors(text: str) -> bool:
def _compute_noise(text_lower: str) -> bool:
"""Detect noisy signals like cookie/subscribe prompts."""
noisy_signals = ["cookie", "subscribe", "javascript", "log in", "sign up"]
noise_count = sum(text_lower.count(signal) for signal in noisy_signals)
return noise_count > THRESHOLD_NOISE
noise_count = 0
for signal in noisy_signals:
noise_count += text_lower.count(signal)
if noise_count > THRESHOLD_NOISE:
return True
return False


def is_bot_challenge(content: str) -> bool:
Expand Down
16 changes: 12 additions & 4 deletions scripts/quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,12 @@ def _check_jargon(text_lower: str) -> bool:
"transform",
"supercharge",
]
jargon_count = sum(text_lower.count(signal) for signal in jargon_signals)
return jargon_count > THRESHOLD_JARGON
jargon_count = 0
for signal in jargon_signals:
jargon_count += text_lower.count(signal)
if jargon_count > THRESHOLD_JARGON:
return True
return False


def _check_frontmatter(text: str) -> bool:
Expand Down Expand Up @@ -115,8 +119,12 @@ def _check_anchors(text: str) -> bool:
def _compute_noise(text_lower: str) -> bool:
"""Detect noisy signals like cookie/subscribe prompts."""
noisy_signals = ["cookie", "subscribe", "javascript", "log in", "sign up"]
noise_count = sum(text_lower.count(signal) for signal in noisy_signals)
return noise_count > THRESHOLD_NOISE
noise_count = 0
for signal in noisy_signals:
noise_count += text_lower.count(signal)
if noise_count > THRESHOLD_NOISE:
return True
return False


def is_bot_challenge(content: str) -> bool:
Expand Down
Loading