Comparing OCR Output → Extracted Data → Display Schedule
Source: Tesseract PSM 6 (Best for schedules)
Parser Output: Pattern matching results
\d{1,2}:\d{2}
[A-Z]?\d{2,3}[A-Z]?
Final Output: What users see
Period | Time | Subject | Room |
---|
Tesseract PSM 6 Results:
if (extractedScheduleItems.length < 3) {
// Not enough data extracted from OCR
// Use typical 7th grade schedule as fallback
return [
{ period: 1, time: "8:00-8:45", subject: "Mathematics", room: "203" },
{ period: 2, time: "8:50-9:35", subject: "English", room: "105" },
{ period: 3, time: "9:40-10:25", subject: "Science", room: "312" },
{ period: 4, time: "10:30-11:15", subject: "Physical Ed", room: "GYM" },
{ period: "Lunch", time: "11:20-12:00", subject: "Lunch Break", room: "CAFE" },
{ period: 5, time: "12:05-12:50", subject: "History", room: "218" },
{ period: 6, time: "12:55-1:40", subject: "Spanish", room: "107" },
{ period: 7, time: "1:45-2:30", subject: "Computer Sci", room: "LAB" }
];
}