Keyven commited on
Commit
fd206e2
·
verified ·
1 Parent(s): 77de910

Upload schemas/form.json with huggingface_hub

Browse files
Files changed (1) hide show
  1. schemas/form.json +66 -0
schemas/form.json ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "german-ocr-3/schemas/form.json",
4
+ "title": "GermanOCR3 Form (Formular)",
5
+ "description": "Generisches Schema fuer ausgefuellte deutsche Formulare. Felder werden als Liste von Label/Value-Paaren geliefert, plus optionale Checkbox-Liste und Unterschriften.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["document_type", "language", "fields"],
9
+ "properties": {
10
+ "document_type": {"const": "form"},
11
+ "language": {"type": "string", "default": "de"},
12
+ "form_title": {"type": ["string", "null"]},
13
+ "form_id": {"description": "z.B. Antragsnummer / Formularkennung", "type": ["string", "null"]},
14
+ "issuing_authority": {"type": ["string", "null"]},
15
+
16
+ "fields": {
17
+ "type": "array",
18
+ "description": "Erkannte Label/Wert-Paare in Lesereihenfolge.",
19
+ "items": {
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "required": ["label", "value"],
23
+ "properties": {
24
+ "label": {"type": "string"},
25
+ "value": {"type": ["string", "number", "boolean", "null"]},
26
+ "section": {"type": ["string", "null"]},
27
+ "page": {"type": ["integer", "null"]}
28
+ }
29
+ }
30
+ },
31
+
32
+ "checkboxes": {
33
+ "type": "array",
34
+ "default": [],
35
+ "items": {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "required": ["label", "checked"],
39
+ "properties": {
40
+ "label": {"type": "string"},
41
+ "checked": {"type": "boolean"},
42
+ "section": {"type": ["string", "null"]}
43
+ }
44
+ }
45
+ },
46
+
47
+ "signatures": {
48
+ "type": "array",
49
+ "default": [],
50
+ "items": {
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "properties": {
54
+ "by": {"type": ["string", "null"]},
55
+ "place": {"type": ["string", "null"]},
56
+ "date": {"type": ["string", "null"]},
57
+ "present": {"type": "boolean"}
58
+ }
59
+ }
60
+ },
61
+
62
+ "raw_text": {"type": ["string", "null"]},
63
+ "confidence": {"type": ["number", "null"], "minimum": 0, "maximum": 1},
64
+ "notes": {"type": "array", "items": {"type": "string"}, "default": []}
65
+ }
66
+ }