MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / score_direction_confidence

Function score_direction_confidence

skills/pdf-parser/scripts/parse_pdf.py:541–547  ·  view source on GitHub ↗

Convert keyword coverage into a conservative single-PDF confidence score.

(match_count: int, keyword_count: int)

Source from the content-addressed store, hash-verified

539
540
541def score_direction_confidence(match_count: int, keyword_count: int) -> float:
542 """Convert keyword coverage into a conservative single-PDF confidence score."""
543 if match_count < 2 or keyword_count <= 0:
544 return 0.0
545
546 coverage = match_count / keyword_count
547 return round(min(0.70, 0.45 + coverage * 0.25), 4)
548
549
550def infer_research_directions(text: str) -> List[Dict]:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected