Revert "fix: Zeilen-Regularisierung im Overlay ueberspringen (generisch fuer gemischte Inhalte)"
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 29s
CI / test-go-edu-search (push) Successful in 31s
CI / test-python-klausur (push) Failing after 2m2s
CI / test-python-agent-core (push) Successful in 18s
CI / test-nodejs-website (push) Successful in 24s

This reverts commit b91f799ccf.
This commit is contained in:
Benjamin Admin
2026-03-11 08:44:07 +01:00
parent b91f799ccf
commit e3ee1de790
4 changed files with 9 additions and 23 deletions

View File

@@ -216,7 +216,7 @@ export default function OcrOverlayPage() {
case 3:
return <StepCrop sessionId={sessionId} onNext={handleNext} />
case 4:
return <StepRowDetection sessionId={sessionId} onNext={handleNext} skipRegularize />
return <StepRowDetection sessionId={sessionId} onNext={handleNext} />
case 5:
return <StepWordRecognition sessionId={sessionId} onNext={handleNext} goToStep={goToStep} />
case 6:

View File

@@ -8,11 +8,9 @@ const KLAUSUR_API = '/klausur-api'
interface StepRowDetectionProps {
sessionId: string | null
onNext: () => void
/** Skip word-center regularization (better for mixed-content pages with boxes) */
skipRegularize?: boolean
}
export function StepRowDetection({ sessionId, onNext, skipRegularize = false }: StepRowDetectionProps) {
export function StepRowDetection({ sessionId, onNext }: StepRowDetectionProps) {
const [rowResult, setRowResult] = useState<RowResult | null>(null)
const [detecting, setDetecting] = useState(false)
const [error, setError] = useState<string | null>(null)
@@ -48,10 +46,7 @@ export function StepRowDetection({ sessionId, onNext, skipRegularize = false }:
setDetecting(true)
setError(null)
try {
const rowsUrl = skipRegularize
? `${KLAUSUR_API}/api/v1/ocr-pipeline/sessions/${sessionId}/rows?skip_regularize=true`
: `${KLAUSUR_API}/api/v1/ocr-pipeline/sessions/${sessionId}/rows`
const res = await fetch(rowsUrl, {
const res = await fetch(`${KLAUSUR_API}/api/v1/ocr-pipeline/sessions/${sessionId}/rows`, {
method: 'POST',
})
if (!res.ok) {
@@ -65,7 +60,7 @@ export function StepRowDetection({ sessionId, onNext, skipRegularize = false }:
} finally {
setDetecting(false)
}
}, [sessionId, skipRegularize])
}, [sessionId])
const handleGroundTruth = useCallback(async (isCorrect: boolean) => {
if (!sessionId) return