fix(columns): filter phantom narrow columns + rename step to OCR-Zeichenkorrektur
Phantom column fix: Adjacent tiny gaps (e.g. 11px + 35px) can create very narrow columns (< 3% of content width) with 0 words. These are scan artefacts, not real columns. New Step 9 in detect_column_geometry(): - Filter columns where width < max(20px, 3% content_w) AND words < 3 - After filtering, extend each remaining column to close the gap with its right neighbor, and re-assign words to correct column Example from logs: 5 columns → 4 columns (phantom at x=710, width=36px eliminated; neighbors expanded to cover the gap) UI rename: - 'Schritt 6: LLM-Korrektur' → 'Schritt 6: OCR-Zeichenkorrektur' - 'LLM-Korrektur starten' → 'Zeichenkorrektur starten' - Error message updated accordingly (No LLM involved anymore — spell-checker is the active engine) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -342,7 +342,7 @@ export function StepLlmReview({ sessionId, onNext }: StepLlmReviewProps) {
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center py-12 text-center">
|
||||
<div className="text-5xl mb-4">⚠️</div>
|
||||
<h3 className="text-lg font-medium text-red-600 dark:text-red-400 mb-2">Fehler bei LLM-Korrektur</h3>
|
||||
<h3 className="text-lg font-medium text-red-600 dark:text-red-400 mb-2">Fehler bei OCR-Zeichenkorrektur</h3>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400 max-w-lg mb-4">{error}</p>
|
||||
<div className="flex gap-3">
|
||||
<button onClick={() => { setError(''); loadSessionData() }}
|
||||
@@ -387,7 +387,7 @@ export function StepLlmReview({ sessionId, onNext }: StepLlmReviewProps) {
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<h3 className="text-base font-medium text-gray-700 dark:text-gray-300">
|
||||
Schritt 6: LLM-Korrektur
|
||||
Schritt 6: OCR-Zeichenkorrektur
|
||||
</h3>
|
||||
<p className="text-xs text-gray-400 mt-0.5">
|
||||
{status === 'ready' && `${vocabEntries.length} Eintraege bereit zur Pruefung`}
|
||||
@@ -405,7 +405,7 @@ export function StepLlmReview({ sessionId, onNext }: StepLlmReviewProps) {
|
||||
{status === 'ready' && (
|
||||
<button onClick={runReview}
|
||||
className="px-5 py-2 bg-teal-600 text-white rounded-lg hover:bg-teal-700 transition-colors text-sm font-medium">
|
||||
LLM-Korrektur starten
|
||||
Zeichenkorrektur starten
|
||||
</button>
|
||||
)}
|
||||
{status === 'running' && (
|
||||
|
||||
Reference in New Issue
Block a user