Copy
Ask AI
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"description": "Document.",
"definitions": {
"borderType": {
"type": "string",
"description": "Tipo de borde de celda de tabla.",
"enum": [
"unknown",
"invisible",
"visible"
]
},
"rect": {
"type": "object",
"description": "Rectangle {l:izquierda, t:arriba, r:derecha, b:abajo}",
"required": [
"l",
"t",
"r",
"b"
],
"properties": {
"l": {
"type": "integer",
"description": "Coordenada izquierda.",
},
"t": {
"type": "integer",
"description": "Coordenada superior.",
},
"r": {
"type": "integer",
"description": "Coordenada derecha.",
},
"b": {
"type": "integer",
"description": "Coordenada inferior.",
}
}
},
"confidence": {
"type": "number",
"description": "Confianza.",
},
"listNumberingStyle": {
"type": "string",
"description": "Estilo de numeración de lista.",
"enum": [
"None",
"Decimal",
"UpperRoman",
"LowerRoman",
"UpperLetter",
"LowerLetter",
"Ordinal",
"CardinalText",
"OrdinalText",
"Hex",
"Chicago",
"IdeographDigital",
"JapaneseCounting",
"Aiueo",
"Iroha",
"DecimalFullWidth",
"DecimalHalfWidth",
"JapaneseLegal",
"JapaneseDigitalTenThousand",
"DecimalEnclosedCircle",
"DecimalFullWidth2",
"AiueoFullWidth",
"IrohaFullWidth",
"DecimalZero",
"Bullet",
"Ganada",
"Chosung",
"DecimalEnclosedFullstop",
"DecimalEnclosedParen",
"DecimalEnclosedCircleChinese",
"IdeographEnclosedCircle",
"IdeographTraditional",
"IdeographZodiac",
"IdeographZodiacTraditional",
"TaiwaneseCounting",
"IdeographLegalTraditional",
"TaiwaneseCountingThousand",
"TaiwaneseDigital",
"ChineseCounting",
"ChineseLegalSimplified",
"ChineseCountingThousand",
"ApplicationDefined",
"KoreanDigital",
"KoreanCounting",
"KoreanLegal",
"KoreanDigital2",
"Hebrew1",
"ArabicAlpha",
"Hebrew2",
"ArabicAbjad",
"HindiVowels",
"HindiConsonants",
"HindiNumbers",
"HindiCounting",
"ThaiLetters",
"ThaiNumbers",
"ThaiCounting",
"VietnameseCounting",
"NumberInDash",
"RussianLower",
"RussianUpper",
"Burmese",
"Unnumbered"
]
},
"listLevel": {
"type": "object",
"description": "Descripción de nivel de lista",
"required": [
"levelIndex",
"numberingStyle",
"startNumber"
],
"properties": {
"levelIndex": {
"type": "integer",
"description": "Índice de nivel.",
"minimum": 0
},
"numberingStyle": {
"$ref": "#/definitions/listNumberingStyle",
"description": "Estilo de numeración de lista.",
},
"startNumber": {
"type": "integer",
"description": "Número inicial.",
}
}
},
"picture": {
"type": "object",
"description": "Bloque con imagen.",
"properties": {
"id": {
"type": "string",
"description": "ID de bloque de imagen.",
},
"position": {
"$ref": "#/definitions/rect"
},
"confidence": {
"$ref": "#/definitions/confidence"
}
}
},
"barcode": {
"type": "object",
"description": "Código de barras.",
"properties": {
"id": {
"type": "string",
"description": "ID de bloque de código de barras.",
},
"position": {
"$ref": "#/definitions/rect"
},
"confidence": {
"$ref": "#/definitions/confidence"
},
"type": {
"type": "string",
"description": "Tipo de código de barras.",
"enum": [
"Code39",
"Interleaved25",
"EAN13",
"Code128",
"EAN8",
"PDF417",
"Codabar",
"UPCE",
"Industrial25",
"IATA25",
"Matrix25",
"Code93",
"PostNet",
"UCC128",
"Patch",
"Aztec",
"DataMatrix",
"QRCode",
"UPCA",
"MaxiCode",
"Code32",
"FullAscii",
"IntelligentMail",
"RoyalMail4State",
"KIX",
"Australia4State",
"JapanPost",
"NotFound"
]
},
"value": {
"type": "string",
"description": "Valor del código de barras.",
},
"supplementType": {
"type": "string",
"description": "Tipo de suplemento.",
"enum": [
"none",
"2digits",
"5digits"
]
},
"supplementValue": {
"type": "string",
"description": "Valor del suplemento.",
}
}
},
"lines": {
"type": "array",
"description": "Matriz de cadenas de texto en el bloque de texto ordenadas por dirección de lectura.",
"items": [
{
"type": "object",
"description": "Una línea de texto.",
"properties": {
"position": {
"$ref": "#/definitions/rect"
},
"confidence": {
"$ref": "#/definitions/confidence"
},
"text": {
"type": "string",
"description": "Valor de una línea de texto.",
},
"charParams": {
"$ref": "#/definitions/charParams"
},
"words": {
"type": "array",
"description": "Matriz de palabras en una línea de texto ordenadas por dirección de lectura.",
"items": [
{
"type": "object",
"description": "Palabra.",
"properties": {
"position": {
"$ref": "#/definitions/rect"
},
"confidence": {
"$ref": "#/definitions/confidence"
},
"text": {
"type": "string",
"description": "Valor de palabra.",
},
"charParams": {
"$ref": "#/definitions/charParams"
},
"chars": {
"type": "array",
"description": "Matriz de caracteres en una palabra ordenados por dirección de lectura.",
"items": [
{
"type": "object",
"description": "Carácter de palabra.",
"properties": {
"confidence": {
"$ref": "#/definitions/confidence"
},
"text": {
"type": "string",
"description": "Valor de carácter de palabra.",
},
"position": {
"$ref": "#/definitions/rect"
},
"charParams": {
"$ref": "#/definitions/charParams"
}
}
}
]
}
}
}
]
}
}
}
]
},
"charParams": {
"type": "object",
"description": "Parámetros de formato de fuente de símbolo.",
"properties": {
"bold": {
"type": "boolean",
"description": "Estado de propiedad negrita - si es diferente del contenedor",
"default": false
},
"italic": {
"type": "boolean",
"description": "Estado de propiedad cursiva - si es diferente del contenedor",
"default": false
},
"underlined": {
"type": "boolean",
"description": "Estado de propiedad subrayado - si es diferente del contenedor",
"default": false
},
"strikeout": {
"type": "boolean",
"description": "Estado de propiedad tachado - si es diferente del contenedor",
"default": false
},
"smallCaps": {
"type": "boolean",
"description": "Estado de propiedad versalitas - si es diferente del contenedor",
"default": false
},
"superscript": {
"type": "boolean",
"description": "Estado de propiedad superíndice - si es diferente del contenedor",
"default": false
},
"subscript": {
"type": "boolean",
"description": "Estado de propiedad subíndice - si es diferente del contenedor",
"default": false
},
"scaling": {
"type": "integer",
"description": "Estado de propiedad de escalado (en milésimas de 1) - si es diferente del contenedor",
"default": 1000,
"minimum": 100,
"maximum": 10000
},
"spacing": {
"type": "integer",
"description": "Estado de la propiedad de espaciado en twips (1/20 pt, 1/1440 pulgada): si difiere del contenedor",
"default": 0,
"minimum": -1000,
"maximum": 1000
},
"fontSize": {
"type": "integer",
"description": "Estado de la propiedad de tamaño de fuente en twips (1/20 pt, 1/1440 pulgada): si difiere del contenedor",
"default": 200,
"minimum": 50,
"maximum": 4000
},
"fontName": {
"type": "string",
"description": "Estado de la propiedad de nombre de fuente: si difiere del contenedor",
},
"color": {
"type": "string",
"description": "Estado de la propiedad de color de fuente del símbolo (valor hexadecimal en formato de 6 dígitos RRGGBB): si difiere del contenedor",
},
"backgroundColor": {
"type": "string",
"description": "Estado de la propiedad de color de fondo del símbolo (valor hexadecimal en formato de 6 dígitos RRGGBB): si difiere del contenedor",
},
"lang": {
"type": "string",
"description": "Estado de la propiedad de idioma del símbolo (consta de partes de idioma y país; consulte ISO 639 e ISO 3166): si difiere del contenedor",
}
}
}
},
"required": [
"version",
"producer"
],
"properties": {
"version": {
"type": "string",
"description": "Versión del esquema del documento.",
"default": "Vantage OCR.Skill JSON output v1.0"
},
"producer": {
"type": "string",
"description": "Autor del archivo JSON.",
"default": "ABBYY Vantage OCR.Skill"
},
"languages": {
"type": "array",
"description": "Lista de idiomas del documento.",
"items": [
{
"type": "string",
"description": "Idioma del documento.",
}
]
},
"layout": {
"type": "object",
"description": "Diseño (estructura física).",
"required": [
"pages"
],
"properties": {
"corrected": {
"type": "boolean",
"description": "Coordenadas de la imagen corregida en la salida.",
"default": true
},
"pages": {
"type": "array",
"description": "Matriz de páginas del documento ordenadas de la primera a la última.",
"items": [
{
"type": "object",
"description": "Página del documento.",
"properties": {
"width": {
"type": "integer",
"description": "Ancho de la página en píxeles.",
},
"height": {
"type": "integer",
"description": "Altura de la página en puntos.",
},
"rotated": {
"type": "string",
"description": "Rotación de la página con respecto a la imagen original.",
"enum": [
"none",
"clockwise",
"counterclockwise",
"upside-down"
]
},
"texts": {
"type": "array",
"description": "Matriz de bloques con texto.",
"items": [
{
"type": "object",
"description": "Texto.",
"properties": {
"id" : {
"type": "string",
"description": "ID del bloque de texto.",
},
"position": {
"$ref": "#/definitions/rect"
},
"confidence": {
"$ref": "#/definitions/confidence"
},
"lines": {
"#ref": "#/definitions/lines"
}
}
}
]
},
"tables": {
"type": "array",
"description": "Matriz de bloques con tabla.",
"items": [
{
"type": "object",
"description": "Tabla.",
"properties": {
"id" : {
"type": "string",
"description": "ID del bloque de tabla.",
},
"position": {
"$ref": "#/definitions/rect"
},
"confidence": {
"$ref": "#/definitions/confidence"
},
"cells": {
"type": "array",
"description": "Celdas de la tabla.",
"items": [
{
"type": "object",
"description": "Celda de la tabla.",
"properties": {
"id" : {
"type": "string",
"description": "ID de la celda de la tabla.",
},
"position": {
"$ref": "#/definitions/rect"
},
"confidence": {
"$ref": "#/definitions/confidence"
},
"colRowPosition": {
"type": "object",
"description": "Coordenada de la celda en el sistema Columna-Fila {l:columnaIzquierda, t:filaSuperior, r:columnaDerecha, b:filaInferior}",
"properties":{
"l": {
"type": "integer",
"description": "Índice del separador izquierdo.",
},
"t": {
"type": "integer",
"description": "Índice del separador superior.",
},
"r": {
"type": "integer",
"description": "Índice del separador derecho.",
},
"b": {
"type": "integer",
"description": "Índice del separador inferior.",
}
}
},
"borders": {
"type": "object",
"description": "Tipos de borde de celda de tabla {l:izquierdo, t:superior, r:derecho, b:inferior}",
"properties":{
"l": {
"$ref": "#/definitions/borderType",
"description": "Tipo de borde izquierdo.",
},
"t": {
"$ref": "#/definitions/borderType",
"description": "Tipo de borde superior.",
},
"r": {
"$ref": "#/definitions/borderType",
"description": "Tipo de borde derecho.",
},
"b": {
"$ref": "#/definitions/borderType",
"description": "Tipo de borde inferior.",
}
}
},
"contentType": {
"type": "string",
"description": "Tipo de contenido de la celda de la tabla: [texto, imagen, código de barras].",
"enum": [
"text",
"picture",
"barcode"
]
},
"picture": {
"$ref": "#/definitions/picture"
},
"barcode": {
"$ref": "#/definitions/barcode"
},
"lines": {
"$ref": "#/definitions/lines"
}
}
}
]
}
}
}
]
},
"pictures": {
"type": "array",
"description": "Matriz de bloques con imagen.",
"items": [
{
"$ref": "#/definitions/picture"
}
]
},
"barcodes": {
"type": "array",
"description": "Matriz de bloques con código de barras.",
"items": [
{
"$ref": "#/definitions/barcode"
}
]
},
"separators": {
"type": "array",
"description": "Matriz de bloques con separador.",
"items": [
{
"type": "object",
"description": "Separador.",
"properties": {
"position": {
"$ref": "#/definitions/rect"
},
"confidence": {
"$ref": "#/definitions/confidence"
},
"color": {
"type": "integer",
"description": "Color del separador.",
},
"thickness": {
"type": "integer",
"description": "Grosor del separador.",
},
"type": {
"type": "string",
"description": "Tipo de separador.",
"enum": [
"unknown",
"solid",
"dotted"
]
},
"endPoints": {
"type": "object",
"description": "Coordenadas de los extremos del separador {startX:inicioX, startY:inicioY, endX:finX, endY:finY}",
"properties":{
"startX": {
"type": "integer",
"description": "Coordenada X del punto de inicio.",
},
"startY": {
"type": "integer",
"description": "Coordenada Y del punto de inicio.",
},
"endX": {
"type": "integer",
"description": "Coordenada X del punto final.",
},
"endY": {
"type": "integer",
"description": "Coordenada Y del punto final.",
}
}
}
}
}
]
},
"checkmarks": {
"type": "array",
"description": "Matriz de bloques con marca de verificación.",
"items": [
{
"type": "object",
"description": "Marca de verificación.",
"properties": {
"position": {
"$ref": "#/definitions/rect"
},
"confidence": {
"$ref": "#/definitions/confidence"
},
"value": {
"type": "string",
"description": "Valor de la marca de verificación.",
"enum": [
"checked",
"unchecked",
"corrected",
"unknown"
]
}
}
}
]
}
}
}
]
}
}
},
"content": {
"type": "object",
"description": "Contenido del documento (estructura lógica).",
"properties": {
"paragraphs": {
"type": "array",
"description": "Matriz de párrafos del documento ordenados por dirección de lectura.",
"items": [
{
"type": "object",
"description": "Párrafo del documento.",
"properties": {
"id": {
"type": "string",
"description": "ID del párrafo en el documento."
},
"role": {
"type": "string",
"description": "Función del párrafo en el documento.",
"enum": [
"other",
"text",
"heading",
"headingNumber",
"tableOfContents",
"tableText",
"runningTitle",
"endNote",
"footNote",
"tableCaption",
"tableHeading",
"pictureCaption",
"artefact"
]
},
"formatting": {
"type": "object",
"description": "Formato del párrafo.",
"properties": {
"aligning": {
"type": "string",
"description": "Alineación del texto en el párrafo.",
"enum": [
"left",
"center",
"right",
"justified",
"justifiedForArabic"
]
},
"lineSpacing": {
"type": "integer",
"description": "Interlineado del párrafo.",
"minimum": 0,
"default": 0
}
}
},
"layoutReferences": {
"type": "array",
"description": "Matriz de referencias a las fuentes de las partes del párrafo del documento en la estructura de bloques de página, en el orden del texto del párrafo.",
"items": [
{
"type": "object",
"description": "ID de bloque/celda de referencia, índice de párrafo y rango de líneas en el bloque/celda.",
"required": [
"blockId",
"blockType",
"parIndex",
"firstLine",
"lastLine"
],
"properties": {
"blockId": {
"type": "string",
"description": "ID del bloque de texto o celda de tabla contenedora."
},
"blockType": {
"type": "string",
"description": "Tipo de contenedor del párrafo.",
"enum": [
"text",
"cell"
]
},
"sectionIndex": {
"type": "integer",
"description": "Índice de la sección lógica en la página (o -1 si no existe una sección que contenga el párrafo, como encabezados, pies de página, etc.).",
"minimum": -1
},
"columnIndex": {
"type": "integer",
"description": "Índice de columna en la sección lógica (o -1 si no existe una columna que contenga el párrafo, como recuadros, notas al pie, etc.).",
"minimum": -1
},
"lineNumbering": {
"type": "boolean",
"description": "true si el párrafo está contenido en el área de numeración de líneas."
},
"parIndex": {
"type": "integer",
"description": "Índice del párrafo en el bloque o celda de tabla.",
"minimum": 0
},
"firstLine": {
"type": "integer",
"description": "Índice de la primera línea del párrafo en el bloque o celda de tabla.",
"minimum": 0
},
"lastLine": {
"type": "integer",
"description": "Índice de la última línea del párrafo en el bloque o celda de tabla.",
"minimum": 0
}
}
}
]
},
"text": {
"type": "string",
"description": "Texto del párrafo."
},
"listReference": {
"type": "object",
"description": "Referencia a la lista que contiene el párrafo.",
"properties": {
"id": {
"type": "string",
"description": "ID de la lista."
},
"levelIndex": {
"type": "integer",
"description": "Índice del nivel del elemento de lista actual.",
"minimum": 0,
"default": 0
},
"ordinalNumber": {
"type": "integer",
"description": "Número ordinal del elemento de lista actual.",
"minimum": -1,
"default": 0
}
}
},
}
}
]
},
"lists": {
"type": "array",
"description": "Matriz de listas encontradas en el documento.",
"items": [
{
"type": "object",
"description": "Descripción de la lista.",
"properties": {
"id": {
"type": "string",
"description": "ID de la lista en el documento."
},
"listLevels": {
"type": "array",
"description": "Matriz de descripciones de niveles de lista.",
"items": [
{
"$ref": "#/definitions/listLevel"
}
]
}
}
}
]
}
}
}
}
}```
