| { |
| "$schema": "https://json-schema.org/draft/2020-12/schema", |
| "$id": "german-ocr-3/schemas/letter.json", |
| "title": "GermanOCR3 Letter (Brief)", |
| "description": "Schema fuer deutsche Geschaefts- oder Behoerdenbriefe (DIN-5008-naher Aufbau).", |
| "type": "object", |
| "additionalProperties": false, |
| "required": ["document_type", "language", "subject", "body"], |
| "properties": { |
| "document_type": {"const": "letter"}, |
| "language": {"type": "string", "default": "de"}, |
|
|
| "sender": { |
| "type": ["object", "null"], |
| "additionalProperties": false, |
| "properties": { |
| "name": {"type": ["string", "null"]}, |
| "address": {"type": ["string", "null"]}, |
| "email": {"type": ["string", "null"]}, |
| "phone": {"type": ["string", "null"]} |
| } |
| }, |
| "recipient": { |
| "type": ["object", "null"], |
| "additionalProperties": false, |
| "properties": { |
| "name": {"type": ["string", "null"]}, |
| "address": {"type": ["string", "null"]} |
| } |
| }, |
|
|
| "place": {"type": ["string", "null"]}, |
| "date": {"description": "Briefdatum YYYY-MM-DD", "type": ["string", "null"]}, |
| "reference": { |
| "description": "Aktenzeichen / Ihr Zeichen / Unser Zeichen.", |
| "type": ["object", "null"], |
| "additionalProperties": false, |
| "properties": { |
| "ihr_zeichen": {"type": ["string", "null"]}, |
| "ihre_nachricht_vom": {"type": ["string", "null"]}, |
| "unser_zeichen": {"type": ["string", "null"]}, |
| "unsere_nachricht_vom": {"type": ["string", "null"]} |
| } |
| }, |
|
|
| "subject": {"type": ["string", "null"]}, |
| "salutation": {"type": ["string", "null"]}, |
| "body": { |
| "description": "Kompletter Brieftext, Absaetze mit \\n\\n getrennt.", |
| "type": ["string", "null"] |
| }, |
| "closing": {"type": ["string", "null"]}, |
| "signatory": {"type": ["string", "null"]}, |
| "enclosures": {"type": "array", "items": {"type": "string"}, "default": []}, |
|
|
| "deadlines_mentioned": { |
| "type": "array", |
| "default": [], |
| "items": { |
| "type": "object", |
| "additionalProperties": false, |
| "properties": { |
| "date": {"type": ["string", "null"]}, |
| "context": {"type": ["string", "null"]} |
| } |
| } |
| }, |
|
|
| "raw_text": {"type": ["string", "null"]}, |
| "confidence": {"type": ["number", "null"], "minimum": 0, "maximum": 1}, |
| "notes": {"type": "array", "items": {"type": "string"}, "default": []} |
| } |
| } |
|
|