File size: 2,637 Bytes
4921bca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---

license: mit
task_categories:
- image-to-text
- optical-character-recognition
language:
- en
tags:
- handwritten-digits
- math-education
- ocr
size_categories:
- n<1K
---


# CalcTrainer Dataset 🧮

Handwritten mathematical answers collected from the [CalcTrainer](https://huggingface.co/spaces/hoololi/CalcTrainer) interactive math training application.

## Dataset Fields

### Core Data
| Field | Type | Description |
|-------|------|-------------|
| `handwriting_image` | Image | Handwritten answer image (~100x100px) |
| `ocr_prediction` | string | Raw OCR output text |
| `ocr_parsed_number` | int32 | Cleaned numeric value from OCR |
| `is_correct` | bool | Whether OCR matches correct answer |

### Mathematical Context
| Field | Type | Description |
|-------|------|-------------|
| `operand_a` | int32 | First number (e.g., 7 in "7 × 3") |
| `operand_b` | int32 | Second number (e.g., 3 in "7 × 3") |
| `operation` | string | Operation: `+`, `-`, `×`, `÷` |
| `correct_answer` | int32 | Expected correct answer |
| `difficulty` | string | `Facile` (Easy) or `Difficile` (Hard) |

### OCR Metrics
| Field | Type | Description |
|-------|------|-------------|
| `ocr_model_name` | string | OCR model used (e.g., "microsoft/trocr-base-handwritten") |
| `ocr_processing_time` | float32 | Processing time in seconds |
| `hardware` | string | Hardware used for OCR |

### Session Info
| Field | Type | Description |
|-------|------|-------------|
| `session_id` | string | Unique session identifier |
| `question_id` | string | Unique question identifier |
| `timestamp` | string | When the session was completed |
| `session_duration` | int32 | Session length (30 or 60 seconds) |
| `session_accuracy` | float32 | Overall session accuracy percentage |
| `session_avg_ocr_time` | float32 | Average OCR time per image in session |

## Usage

```python

from datasets import load_dataset



dataset = load_dataset("hoololi/CalcTrainer_dataset")

train_data = dataset["train"]



# Example: Access first item

item = train_data[0]

print(f"Math problem: {item['operand_a']} {item['operation']} {item['operand_b']} = {item['correct_answer']}")

print(f"OCR predicted: '{item['ocr_prediction']}' → {item['ocr_parsed_number']}")

print(f"Correct: {item['is_correct']}")

```

## Data Source

Real handwriting samples from users solving math problems in the CalcTrainer application. Users write answers on a digital canvas during timed math sessions.

**Generated from**: [CalcTrainer Interactive Math Training](https://huggingface.co/spaces/hoololi/CalcTrainer) 🧮