Validation
Input validation for clinical summary text.
Enforces minimum length and non-empty constraints before the summary enters the scoring pipeline. Used by both the CLI layer and the orchestrator.
validate_summary_text(summary)
Validate and clean a raw summary string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
summary
|
str | None
|
Raw summary text (may be |
required |
Returns:
| Type | Description |
|---|---|
str
|
The whitespace-stripped summary text. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/grading_pipeline/validation.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |