{
  "$defs": {
    "ErrorItem": {
      "properties": {
        "type": {
          "enum": [
            "spelling",
            "grammar",
            "factual",
            "method",
            "calculation",
            "missing_key_point",
            "missing_unit",
            "label",
            "irrelevant"
          ],
          "title": "Type",
          "type": "string"
        },
        "line_ref": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Line Ref"
        },
        "as_written": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "As Written"
        },
        "correction": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Correction"
        },
        "remark": {
          "maxLength": 120,
          "title": "Remark",
          "type": "string"
        },
        "key_point_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Key Point Id"
        }
      },
      "required": [
        "type",
        "remark"
      ],
      "title": "ErrorItem",
      "type": "object"
    },
    "KeyPointStatus": {
      "properties": {
        "key_point_id": {
          "title": "Key Point Id",
          "type": "string"
        },
        "status": {
          "enum": [
            "present",
            "partial",
            "absent"
          ],
          "title": "Status",
          "type": "string"
        },
        "line_ref": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Line Ref"
        }
      },
      "required": [
        "key_point_id",
        "status"
      ],
      "title": "KeyPointStatus",
      "type": "object"
    },
    "PositiveItem": {
      "properties": {
        "line_ref": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Line Ref"
        },
        "key_point_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Key Point Id"
        },
        "remark": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Remark"
        }
      },
      "title": "PositiveItem",
      "type": "object"
    },
    "UnitFinding": {
      "properties": {
        "unit_id": {
          "title": "Unit Id",
          "type": "string"
        },
        "correctness": {
          "maximum": 1,
          "minimum": 0,
          "title": "Correctness",
          "type": "number"
        },
        "completeness": {
          "maximum": 1,
          "minimum": 0,
          "title": "Completeness",
          "type": "number"
        },
        "key_points": {
          "items": {
            "$ref": "#/$defs/KeyPointStatus"
          },
          "title": "Key Points",
          "type": "array"
        },
        "error_items": {
          "items": {
            "$ref": "#/$defs/ErrorItem"
          },
          "title": "Error Items",
          "type": "array"
        },
        "positive_items": {
          "items": {
            "$ref": "#/$defs/PositiveItem"
          },
          "title": "Positive Items",
          "type": "array"
        },
        "brief": {
          "title": "Brief",
          "type": "string"
        },
        "detailed": {
          "title": "Detailed",
          "type": "string"
        }
      },
      "required": [
        "unit_id",
        "correctness",
        "completeness",
        "brief",
        "detailed"
      ],
      "title": "UnitFinding",
      "type": "object"
    }
  },
  "properties": {
    "units": {
      "items": {
        "$ref": "#/$defs/UnitFinding"
      },
      "title": "Units",
      "type": "array"
    },
    "strengths": {
      "items": {
        "type": "string"
      },
      "title": "Strengths",
      "type": "array"
    },
    "weaknesses": {
      "items": {
        "type": "string"
      },
      "title": "Weaknesses",
      "type": "array"
    },
    "suggestions": {
      "items": {
        "type": "string"
      },
      "title": "Suggestions",
      "type": "array"
    },
    "summary": {
      "default": "",
      "title": "Summary",
      "type": "string"
    }
  },
  "required": [
    "units"
  ],
  "title": "ScriptFinding",
  "type": "object"
}