メインコンテンツへスキップ
field の値や field の構造、ルールチェックのエラーなどの抽出データをエクスポートする際に使用される OCR JSON スキーマです。
"$schema": "http://json-schema.org/draft-07/schema",
  "type": "object",
  "description": "Document",
  "definitions": {
    "borderType": {
      "type": "string",
      "description": "表セルの境界線タイプ",
      "enum": [
        "unknown",
        "invisible",
        "visible"
      ]
    },
    "rect": {
      "type": "object",
      "description": "Rectangle {r:left, t:top, r:right, b:bottom}",
      "required": [
        "l",
        "t",
        "r",
        "b"
      ],
      "properties": {
        "l": {
          "type": "integer",
          "description": "左座標",
        },
        "t": {
          "type": "integer",
          "description": "上座標",
        },
        "r": {
          "type": "integer",
          "description": "右座標",
        },
        "b": {
          "type": "integer",
          "description": "下座標",
        }
      }
    },
    "confidence": {
      "type": "number",
      "description": "信頼度",
    },
    "listNumberingStyle": {
      "type": "string",
      "description": "リストの番号付けスタイル",
      "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": "リストレベルの説明",
      "required": [
        "levelIndex",
        "numberingStyle",
        "startNumber"
      ],
      "properties": {
        "levelIndex": {
          "type": "integer",
          "description": "レベルインデックス",
          "minimum": 0
        },
        "numberingStyle": {
          "$ref": "#/definitions/listNumberingStyle",
          "description": "リストの番号付けスタイル",
        },
        "startNumber": {
          "type": "integer",
          "description": "開始番号",
        }
      }
    },
    "picture": {
      "type": "object",
      "description": "画像を含むブロック",
      "properties": {
        "id": {
          "type": "string",
          "description": "画像ブロックID",
        },
        "position": {
          "$ref": "#/definitions/rect"
        },
        "confidence": {
          "$ref": "#/definitions/confidence"
        }
      }
    },
    "barcode": {
      "type": "object",
      "description": "バーコード",
      "properties": {
        "id": {
          "type": "string",
          "description": "バーコードブロックID",
        },
        "position": {
          "$ref": "#/definitions/rect"
        },
        "confidence": {
          "$ref": "#/definitions/confidence"
        },
        "type": {
          "type": "string",
          "description": "バーコードタイプ",
          "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": "バーコード値",
        },
        "supplementType": {
          "type": "string",
          "description": "補足タイプ",
          "enum": [
            "none",
            "2digits",
            "5digits"
          ]
        },
        "supplementValue": {
          "type": "string",
          "description": "補足値",
        }
      }
    },
    "lines": {
      "type": "array",
      "description": "読み取り方向順に並べられたテキストブロック内のテキスト文字列の配列",
      "items": [
        {
          "type": "object",
          "description": "テキスト行",
          "properties": {
            "position": {
              "$ref": "#/definitions/rect"
            },
            "confidence": {
              "$ref": "#/definitions/confidence"
            },
            "text": {
              "type": "string",
              "description": "テキスト行の値",
            },
            "charParams": {
              "$ref": "#/definitions/charParams"
            },
            "words": {
              "type": "array",
              "description": "読み取り方向順に並べられたテキスト行内の単語の配列",
              "items": [
                {
                  "type": "object",
                  "description": "単語",
                  "properties": {
                    "position": {
                      "$ref": "#/definitions/rect"
                    },
                    "confidence": {
                      "$ref": "#/definitions/confidence"
                    },
                    "text": {
                      "type": "string",
                      "description": "単語の値",
                    },
                    "charParams": {
                      "$ref": "#/definitions/charParams"
                    },
                    "chars": {
                      "type": "array",
                      "description": "読み取り方向順に並べられた単語内の文字の配列",
                      "items": [
                        {
                          "type": "object",
                          "description": "単語の文字",
                          "properties": {
                            "confidence": {
                              "$ref": "#/definitions/confidence"
                            },
                            "text": {
                              "type": "string",
                              "description": "単語の文字値",
                            },
                            "position": {
                              "$ref": "#/definitions/rect"
                            },
                            "charParams": {
                              "$ref": "#/definitions/charParams"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      ]
    },
    "charParams": {
      "type": "object",
      "description": "文字フォントの書式設定パラメータ",
      "properties": {
        "bold": {
          "type": "boolean",
          "description": "太字プロパティの状態 - コンテナと異なる場合",
          "default": false
        },
        "italic": {
          "type": "boolean",
          "description": "斜体プロパティの状態 - コンテナと異なる場合",
          "default": false
        },
        "underlined": {
          "type": "boolean",
          "description": "下線プロパティの状態 - コンテナと異なる場合",
          "default": false
        },
        "strikeout": {
          "type": "boolean",
          "description": "取り消し線プロパティの状態 - コンテナと異なる場合",
          "default": false
        },
        "smallCaps": {
          "type": "boolean",
          "description": "スモールキャップスプロパティの状態 - コンテナと異なる場合",
          "default": false
        },
        "superscript": {
          "type": "boolean",
          "description": "上付き文字プロパティの状態 - コンテナと異なる場合",
          "default": false
        },
        "subscript": {
          "type": "boolean",
          "description": "下付き文字プロパティの状態 - コンテナと異なる場合",
          "default": false
        },
        "scaling": {
          "type": "integer",
          "description": "スケーリングプロパティの状態(1の千分の一単位) - コンテナと異なる場合",
          "default": 1000,
          "minimum": 100,
          "maximum": 10000
        },
        "spacing": {
          "type": "integer",
          "description": "間隔プロパティの状態(twips単位:1/20 pt、1/1440インチ) - コンテナと異なる場合",
          "default": 0,
          "minimum": -1000,
          "maximum": 1000
        },
        "fontSize": {
          "type": "integer",
          "description": "フォントサイズプロパティの状態(twips単位:1/20 pt、1/1440インチ) - コンテナと異なる場合",
          "default": 200,
          "minimum": 50,
          "maximum": 4000
        },
        "fontName": {
          "type": "string",
          "description": "フォント名プロパティの状態 - コンテナと異なる場合",
        },
        "color": {
          "type": "string",
          "description": "記号のフォント色プロパティの状態(6桁形式RRGGBBの16進数値) - コンテナと異なる場合",
        },
        "backgroundColor": {
          "type": "string",
          "description": "記号の背景色プロパティの状態(6桁形式RRGGBBの16進数値) - コンテナと異なる場合",
        },
        "lang": {
          "type": "string",
          "description": "記号の言語プロパティの状態(言語と国の部分で構成、ISO 639およびISO 3166を参照) - コンテナと異なる場合",
        }
      }
    }
  },
  "required": [
    "version",
    "producer"
  ],
  "properties": {
    "version": {
      "type": "string",
      "description": "Documentスキーマのバージョン。",
      "default": "Vantage OCR.Skill JSON output v1.0"
    },
    "producer": {
      "type": "string",
      "description": "JSONファイルの作成者。",
      "default": "ABBYY Vantage OCR.Skill"
    },
    "languages": {
      "type": "array",
      "description": "ドキュメント言語のリスト。",
      "items": [
        {
          "type": "string",
          "description": "ドキュメント言語。",
        }
      ]
    },
    "layout": {
      "type": "object",
      "description": "レイアウト(物理構造)。",
      "required": [
        "pages"
      ],
      "properties": {
        "corrected": {
          "type": "boolean",
          "description": "出力時の補正された画像の座標。",
          "default": true
        },
        "pages": {
          "type": "array",
          "description": "最初から最後まで順に並べられたドキュメントページの配列。",
          "items": [
            {
              "type": "object",
              "description": "ドキュメントページ。",
              "properties": {
                "width": {
                  "type": "integer",
                  "description": "ページの幅(ピクセル単位)。",
                },
                "height": {
                  "type": "integer",
                  "description": "ページの高さ(ポイント単位)。",
                },
                "rotated": {
                  "type": "string",
                  "description": "元の画像に対するページの回転。",
                  "enum": [
                    "none",
                    "clockwise",
                    "counterclockwise",
                    "upside-down"
                  ]
                },
                "texts": {
                  "type": "array",
                  "description": "テキストを含むブロックの配列。",
                  "items": [
                    {
                      "type": "object",
                      "description": "テキスト。",
                      "properties": {
                        "id" : {
                          "type": "string",
                          "description": "テキストブロックID。",
                        },
                        "position": {
                          "$ref": "#/definitions/rect"
                        },
                        "confidence": {
                          "$ref": "#/definitions/confidence"
                        },
                        "lines": {
                          "#ref": "#/definitions/lines"
                        }
                      }
                    }
                  ]
                },
                "tables": {
                  "type": "array",
                  "description": "テーブルを含むブロックの配列。",
                  "items": [
                    {
                      "type": "object",
                      "description": "テーブル。",
                      "properties": {
                        "id" : {
                          "type": "string",
                          "description": "テーブルブロックID。",
                        },
                        "position": {
                          "$ref": "#/definitions/rect"
                        },
                        "confidence": {
                          "$ref": "#/definitions/confidence"
                        },
                        "cells": {
                          "type": "array",
                          "description": "テーブルセル。",
                          "items": [
                            {
                              "type": "object",
                              "description": "テーブルセル。",
                              "properties": {
                                "id" : {
                                  "type": "string",
                                  "description": "テーブルセルID。",
                                },
                                "position": {
                                  "$ref": "#/definitions/rect"
                                },
                                "confidence": {
                                  "$ref": "#/definitions/confidence"
                                },
                                "colRowPosition": {
                                  "type": "object",
                                  "description": "列-行システムにおけるセル座標 {l:左列、t:上行、r:右列、b:下行}",
                                  "properties":{
                                    "l": {
                                      "type": "integer",
                                      "description": "左区切り線のインデックス。",
                                    },
                                    "t": {
                                      "type": "integer",
                                      "description": "上区切り線のインデックス。",
                                    },
                                    "r": {
                                      "type": "integer",
                                      "description": "右区切り線のインデックス。",
                                    },
                                    "b": {
                                      "type": "integer",
                                      "description": "下区切り線のインデックス。",
                                    }
                                  }
                                },
                                "borders": {
                                  "type": "object",
                                  "description": "テーブルセルの境界線タイプ {l:左、t:上、r:右、b:下}",
                                  "properties":{
                                    "l": {
                                      "$ref": "#/definitions/borderType",
                                      "description": "左境界線タイプ。",
                                    },
                                    "t": {
                                      "$ref": "#/definitions/borderType",
                                      "description": "上境界線タイプ。",
                                    },
                                    "r": {
                                      "$ref": "#/definitions/borderType",
                                      "description": "右境界線タイプ。",
                                    },
                                    "b": {
                                      "$ref": "#/definitions/borderType",
                                      "description": "下境界線タイプ。",
                                    }
                                  }
                                },
                                "contentType": {
                                  "type": "string",
                                  "description": "テーブルセルのコンテンツタイプ:[text、picture、barcode]。",
                                  "enum": [
                                    "text",
                                    "picture",
                                    "barcode"
                                  ]
                                },
                                "picture": {
                                  "$ref": "#/definitions/picture"
                                },
                                "barcode": {
                                  "$ref": "#/definitions/barcode"
                                },
                                "lines": {
                                  "$ref": "#/definitions/lines"
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  ]
                },
                "pictures": {
                  "type": "array",
                  "description": "画像を含むブロックの配列。",
                  "items": [
                    {
                      "$ref": "#/definitions/picture"
                    }
                  ]
                },
                "barcodes": {
                  "type": "array",
                  "description": "バーコードを含むブロックの配列。",
                  "items": [
                    {
                      "$ref": "#/definitions/barcode"
                    }
                  ]
                },
                "separators": {
                  "type": "array",
                  "description": "区切り線を含むブロックの配列。",
                  "items": [
                    {
                      "type": "object",
                      "description": "区切り線。",
                      "properties": {
                        "position": {
                          "$ref": "#/definitions/rect"
                        },
                        "confidence": {
                          "$ref": "#/definitions/confidence"
                        },
                        "color": {
                          "type": "integer",
                          "description": "区切り線の色。",
                        },
                        "thickness": {
                          "type": "integer",
                          "description": "区切り線の太さ。",
                        },
                        "type": {
                          "type": "string",
                          "description": "区切り線のタイプ。",
                          "enum": [
                            "unknown",
                            "solid",
                            "dotted"
                          ]
                        },
                        "endPoints": {
                          "type": "object",
                          "description": "区切り線の端の座標 {startX:開始X、startY:開始Y、endX:終了X、endY:終了Y}",
                          "properties":{
                            "startX": {
                              "type": "integer",
                              "description": "開始点のX座標。",
                            },
                            "startY": {
                              "type": "integer",
                              "description": "開始点のY座標。",
                            },
                            "endX": {
                              "type": "integer",
                              "description": "終了点のX座標。",
                            },
                            "endY": {
                              "type": "integer",
                              "description": "終了点のY座標。",
                            }
                          }
                        }
                      }
                    }
                  ]
                },
                "checkmarks": {
                  "type": "array",
                  "description": "チェックマークを含むブロックの配列。",
                  "items": [
                    {
                      "type": "object",
                      "description": "チェックマーク。",
                      "properties": {
                        "position": {
                          "$ref": "#/definitions/rect"
                        },
                        "confidence": {
                          "$ref": "#/definitions/confidence"
                        },
                        "value": {
                          "type": "string",
                          "description": "チェックマークの値。",
                          "enum": [
                            "checked",
                            "unchecked",
                            "corrected",
                            "unknown"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          ]
        }
      }
    },
    "content": {
      "type": "object",
      "description": "Documentのコンテンツ(論理構造)。",
      "properties": {
        "paragraphs": {
          "type": "array",
          "description": "読み取り方向順に並べられたドキュメント段落の配列。",
          "items": [
            {
              "type": "object",
              "description": "ドキュメントの段落。",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "ドキュメント内の段落ID。",
                },
                "role": {
                  "type": "string",
                  "description": "ドキュメント内の段落の役割。",
                  "enum": [
                    "other",
                    "text",
                    "heading",
                    "headingNumber",
                    "tableOfContents",
                    "tableText",
                    "runningTitle",
                    "endNote",
                    "footNote",
                    "tableCaption",
                    "tableHeading",
                    "pictureCaption",
                    "artefact"
                  ]
                },
                "formatting": {
                  "type": "object",
                  "description": "段落の書式設定。",
                  "properties": {
                    "aligning": {
                      "type": "string",
                      "description": "段落内のテキストの配置。",
                      "enum": [
                        "left",
                        "center",
                        "right",
                        "justified",
                        "justifiedForArabic"
                      ]
                    },
                    "lineSpacing": {
                      "type": "integer",
                      "description": "段落の行間隔。",
                      "minimum": 0,
                      "default": 0
                    }
                  }
                },
                "layoutReferences": {
                  "type": "array",
                  "description": "段落内のテキストの順序で、ページブロック構造内のドキュメント段落パーツのソースの配列。",
                  "items": [
                    {
                      "type": "object",
                      "description": "参照ブロック/セルID、段落インデックス、およびブロック/セル内の行範囲。",
                      "required": [
                        "blockId",
                        "blockType",
                        "parIndex",
                        "firstLine",
                        "lastLine"
                      ],
                      "properties": {
                        "blockId": {
                          "type": "string",
                          "description": "含まれるテキストブロックまたはテーブルセルのID。",
                        },
                        "blockType": {
                          "type": "string",
                          "description": "段落コンテナのタイプ。",
                          "enum": [
                            "text",
                            "cell"
                          ]
                        },
                        "sectionIndex": {
                          "type": "integer",
                          "description": "ページ上の論理セクションのインデックス(段落を含むセクションがない場合は-1 - ヘッダー、フッターなど)。",
                          "minimum": -1
                        },
                        "columnIndex": {
                          "type": "integer",
                          "description": "論理セクション内の列のインデックス(段落を含む列がない場合は-1 - 挿入記事、脚注など)。",
                          "minimum": -1
                        },
                        "lineNumbering": {
                          "type": "boolean",
                          "description": "段落が行番号付けエリアに含まれている場合はtrue。",
                        },
                        "parIndex": {
                          "type": "integer",
                          "description": "ブロックまたはテーブルセル内の段落インデックス。",
                          "minimum": 0
                        },
                        "firstLine": {
                          "type": "integer",
                          "description": "ブロックまたはテーブルセル内の段落の最初の行のインデックス。",
                          "minimum": 0
                        },
                        "lastLine": {
                          "type": "integer",
                          "description": "ブロックまたはテーブルセル内の段落の最後の行のインデックス。",
                          "minimum": 0
                        }
                      }
                    }
                  ]
                },
                "text": {
                  "type": "string",
                  "description": "段落のテキスト。",
                },
                "listReference": {
                  "type": "object",
                  "description": "段落を含むリストへの参照。",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "リストID。",
                    },
                    "levelIndex": {
                      "type": "integer",
                      "description": "現在のリスト項目のレベルインデックス。",
                      "minimum": 0,
                      "default": 0
                    },
                    "ordinalNumber": {
                      "type": "integer",
                      "description": "現在のリスト項目の序数。",
                      "minimum": -1,
                      "default": 0
                    }
                  }
                },
                
              }
            }
          ]
        },
        "lists": {
          "type": "array",
          "description": "ドキュメント内で見つかったリストの配列。",
          "items": [
            {
              "type": "object",
              "description": "リストの説明。",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "ドキュメント内のリストID。",
                },
                "listLevels": {
                  "type": "array",
                  "description": "リストレベルの説明の配列。",
                  "items": [
                    {
                      "$ref": "#/definitions/listLevel"
                    }
                  ]
                }
              }
            }
          ]
        }
      }
    }
  }
}```