{
  "name": "Heuristic Chyron Understanding",
  "description": "Prototype to convert chyron text from OCR output (e.g., docTR, Tesseract or a VLM captioner) into a name and list of attributes, with line-based heuristics.",
  "app_version": "v0.3",
  "mmif_version": "1.2.0",
  "app_license": "Apache 2.0",
  "identifier": "http://apps.clams.ai/heuristic-chyron-understanding/v0.3",
  "url": "https://github.com/clamsproject/app-heuristic-chyron-understanding",
  "input": [
    {
      "@type": "http://clams.ai/vocabulary/type/TextDocument/v2",
      "description": "Chyron text transcribed by an OCR app. The app reads the TextDocuments of the last view that has any; without such a view, the top-level TextDocuments of the MMIF. Empty texts and \"no text\" markers (e.g., `NONE`, `N/A`) are skipped, and markdown code fence lines (e.g., \"```\") around the text are ignored.",
      "required": true
    }
  ],
  "output": [
    {
      "@type": "http://clams.ai/vocabulary/type/TextDocument/v2",
      "description": "Reformatted chyron text, one per input TextDocument: a JSON string with three fields, `name-as-written`, `name-normalized` and `attributes`. The `origins` property points to the input OCR TextDocument; `document` is copied from it, or else is the ID of the source `VideoDocument`.",
      "properties": {
        "document": "*",
        "origins": "*",
        "origination": "derived",
        "mime": "application/json"
      }
    }
  ],
  "parameters": [
    {
      "name": "note4mode",
      "description": "Boolean to set the app to run in \"note-4\" mode and to take the second line (if available) from the input text to be the `name-normalized` value. The default is false, which means the app will try to generate normalization from`name-as-written` (from the first line) value. ",
      "type": "boolean",
      "default": false,
      "multivalued": false
    },
    {
      "name": "pretty",
      "description": "The JSON body of the HTTP response will be re-formatted with 2-space indentation",
      "type": "boolean",
      "default": false,
      "multivalued": false
    },
    {
      "name": "runningTime",
      "description": "The running time of the app will be recorded in the view metadata",
      "type": "boolean",
      "default": true,
      "multivalued": false
    },
    {
      "name": "hwFetch",
      "description": "The hardware information (architecture, GPU and vRAM) will be recorded in the view metadata",
      "type": "boolean",
      "default": false,
      "multivalued": false
    },
    {
      "name": "tfSamplingMode",
      "description": "Sampling mode for TimeFrame annotations. Has no effect when the app does not process TimeFrames. \"representatives\" uses all representative timepoints if present, otherwise skips the TimeFrame. \"single\" uses the middle representative if present, otherwise extracts an image from the midpoint of the start/end interval (midpoint is calculated by floor division of the sum of start and end). \"all\" uses all target timepoints if present, otherwise extracts all images from the time interval.",
      "type": "string",
      "choices": [
        "representatives",
        "single",
        "all"
      ],
      "default": "representatives",
      "multivalued": false
    }
  ]
}