← All message topics  ·  schema DialogAgent/chat_analysis_message.json

header

FieldTypeRequiredAllowed valuesDescription
timestamp string
message_type string event
version string The message format version

msg

FieldTypeRequiredAllowed valuesDescription
experiment_id string
trial_id string
timestamp string
source string
sub_type string Event:dialogue_event
version string
replay_parent_type string|null TRIAL REPLAY null
replay_parent_id string|null
replay_id string|null

data

FieldTypeRequiredAllowed valuesDescription
participant_id string
asr_msg_id string
text string
utterance_source object
utterance_source.source_type string
utterance_source.source_name string
extractions Seq[object]

Example message

{
  "header": {
    "timestamp": "2021-10-07T18:27:42.843Z",
    "message_type": "event",
    "version": "1.1"
  },
  "msg": {
    "experiment_id": "367624f8-81cd-4661-a03f-b61908c39581",
    "trial_id": "78822ceb-448a-436e-a1f1-f154f2066261",
    "timestamp": "2021-10-07T18:27:42.843Z",
    "source": "tomcat_textAnalyzer",
    "sub_type": "Event:dialogue_event",
    "version": "3.0.1",
    "replay_root_id": "",
    "replay_id": ""
  },
  "data": {
    "participant_id": "P00012",
    "asr_msg_id": "bc36d1aa-25e6-11ec-ab58-7831c1b845fe",
    "text": "I'm going to room 204.",
    "dialog_act_label": "Statement",
    "utterance_source": {
      "source_type": "message_bus",
      "source_name": "agent/asr/final"
    },
    "extractions": [
      {
        "labels": [
          "MoveTo",
          "Move",
          "SimpleActions",
          "Action",
          "EventLike",
          "Concept"
        ],
        "span": "going to room 204",
        "arguments": {
          "target": [
            {
              "labels": [
                "NumberedRoom",
                "Room",
                "Infrastructure",
                "Location",
                "EventLike",
                "Concept"
              ],
              "span": "room 204",
              "arguments": {
                "number": [
                  {
                    "labels": [
                      "Number",
                      "Concept"
                    ],
                    "span": "204",
                    "arguments": {},
                    "attachments": [],
                    "start_offset": 18,
                    "end_offset": 21,
                    "rule": "numbers"
                  }
                ]
              },
              "attachments": [],
              "start_offset": 13,
              "end_offset": 21,
              "rule": "room_numbered"
            }
          ]
        },
        "attachments": [
          "{\"text\":\"I\",\"agentType\":\"Self\",\"labels\":[\"Self\",\"Entity\",\"Concept\"],\"span\":[0]}"
        ],
        "start_offset": 4,
        "end_offset": 21,
        "rule": "move_nmod_action"
      },
      {
        "labels": [
          "NumberedRoom",
          "Room",
          "Infrastructure",
          "Location",
          "EventLike",
          "Concept"
        ],
        "span": "room 204",
        "arguments": {
          "number": [
            {
              "labels": [
                "Number",
                "Concept"
              ],
              "span": "204",
              "arguments": {},
              "attachments": [],
              "start_offset": 18,
              "end_offset": 21,
              "rule": "numbers"
            }
          ]
        },
        "attachments": [],
        "start_offset": 13,
        "end_offset": 21,
        "rule": "room_numbered"
      },
      {
        "labels": [
          "Room",
          "Infrastructure",
          "Location",
          "EventLike",
          "Concept"
        ],
        "span": "room",
        "arguments": {},
        "attachments": [],
        "start_offset": 13,
        "end_offset": 17,
        "rule": "room_detection"
      }
    ]
  }
}
Raw JSON Schema (resolved)
{
  "$id": "https://github.com/clulab/tomcat-text/message_specs/chat_analysis_message.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "properties": {
    "data": {
      "$id": "#/properties/data",
      "properties": {
        "asr_msg_id": {
          "$asr_msg_id": "#/properties/data/properties/id",
          "default": "",
          "examples": [
            "59678a5f-9c5b-451f-8506-04bc020f2cf3"
          ],
          "pattern": "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}",
          "title": "The ASR Message ID schema",
          "type": "string"
        },
        "extractions": {
          "$id": "#/properties/data/properties/extractions",
          "default": "[]",
          "properties": {
            "arguments": {
              "$id": "#/properties/arguments",
              "default": "",
              "examples": [
                "#/definitions/id"
              ],
              "pattern": "^(.*)$",
              "title": "arguments schema",
              "type": "string"
            },
            "dialog_act_label": {
              "$id": "#/properties/dialog_act_label",
              "default": "",
              "examples": [
                "Statement",
                "Joke"
              ],
              "pattern": "^(.*)$",
              "title": "dialog_act_label schema",
              "type": "string"
            },
            "end_offset": {
              "$id": "#/properties/end_offset",
              "default": "",
              "examples": [
                50
              ],
              "pattern": "^[0-9]+$",
              "title": "end_offset schema",
              "type": "integer"
            },
            "labels": {
              "$id": "#/properties/labels",
              "default": "",
              "examples": [
                "[\"MoveTo\", \"Move\", \"SimpleAction\"]"
              ],
              "items": {
                "type": "string"
              },
              "pattern": "^(.*)$",
              "title": "The labels schema",
              "type": "array"
            },
            "rule": {
              "$id": "#/properties/rule",
              "default": "",
              "examples": [
                "move_nmod_action"
              ],
              "pattern": "^(.*)$",
              "title": "rule schema",
              "type": "string"
            },
            "span": {
              "$id": "#/properties/span",
              "default": "",
              "examples": [
                "was one yellow victim"
              ],
              "pattern": "^(.*)$",
              "title": "span schema",
              "type": "string"
            },
            "start_offset": {
              "$id": "#/properties/start_offset",
              "default": "",
              "examples": [
                32
              ],
              "pattern": "^[0-9]+$",
              "title": "start_offset schema",
              "type": "integer"
            }
          },
          "required": [],
          "title": "The Data Extractions Schema",
          "type": "Seq[object]",
          "version": "0.1"
        },
        "participant_id": {
          "$id": "#/properties/data/properties/participant_id",
          "default": "",
          "examples": [
            "participant 21"
          ],
          "pattern": "^(.*)$",
          "title": "The Participant Id schema",
          "type": "string"
        },
        "text": {
          "$id": "#/properties/data/properties/text",
          "default": "",
          "examples": [
            "I see a green victim"
          ],
          "pattern": "^(.*)$",
          "title": "text schema",
          "type": "string"
        },
        "utterance_source": {
          "$id": "#/properties/data/properties/source",
          "properties": {
            "source_name": {
              "$id": "#/properties/data/properties/source/properties/source_name",
              "default": "",
              "examples": [
                "AudioTranscript_1.vtt"
              ],
              "pattern": "^[a-zA-Z0-9_\\.\\/]*$",
              "title": "The Data Source Name Schema",
              "type": "string"
            },
            "source_type": {
              "$id": "#/properties/data/properties/source/properties/source_type",
              "default": "",
              "examples": [
                "vtt_file"
              ],
              "pattern": "^([a-z_]*?)$",
              "title": "The Data Source Type Schema",
              "type": "string"
            }
          },
          "required": [
            "source_type"
          ],
          "title": "The Data Source Schema",
          "type": "object",
          "version": "0.5"
        }
      },
      "required": [
        "participant_id",
        "asr_msg_id",
        "text",
        "extractions"
      ],
      "title": "data schema",
      "type": "object",
      "version": "0.1"
    },
    "header": {
      "$id": "http://asist.aptima.com/schemas/common_header.json",
      "$schema": "http://json-schema.org/draft-07/schema#",
      "definitions": {},
      "properties": {
        "message_type": {
          "$id": "#/properties/message_type",
          "const": "event",
          "enum": [
            "control",
            "observation",
            "chat",
            "status",
            "trial",
            "event",
            "groundtruth",
            "experiment",
            "metadata",
            "agent"
          ],
          "examples": [
            "observation"
          ],
          "pattern": "^([a-z_]*?)$",
          "title": "The Message_type Schema",
          "type": "string"
        },
        "timestamp": {
          "$id": "#/properties/timestamp",
          "examples": [
            "2019-12-26T12:47:23.1234Z"
          ],
          "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.]?[0-9]{0,}?Z",
          "title": "The Timestamp Schema",
          "type": "string"
        },
        "version": {
          "$id": "#/properties/version",
          "examples": [
            "1.0",
            "2.3.1"
          ],
          "pattern": "^([0-9]+\\.)?([0-9]+\\.)?([0-9]+)$",
          "title": "The message format version",
          "type": "string"
        }
      },
      "required": [
        "timestamp",
        "message_type",
        "version"
      ],
      "title": "ASIST message common header Schema",
      "type": "object",
      "version": "0.3"
    },
    "msg": {
      "$id": "http://asist.aptima.com/schemas/event_message.json",
      "$schema": "http://json-schema.org/draft-07/schema#",
      "definitions": {},
      "properties": {
        "experiment_id": {
          "$id": "#/properties/experiment_id",
          "default": "",
          "examples": [
            "123e4567-e89b-12d3-a456-426655440000"
          ],
          "pattern": "(([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|Not Set|Null|null)",
          "title": "The Experiment Id Schema",
          "type": "string"
        },
        "replay_id": {
          "$id": "#/properties/replay_id",
          "default": "",
          "examples": [
            "123e4567-e89b-12d3-a456-426655440000"
          ],
          "pattern": "(([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|Not Set|null|Null)",
          "title": "The Replay Id Schema",
          "type": [
            "string",
            "null"
          ]
        },
        "replay_parent_id": {
          "$id": "#/properties/replay_parent_id",
          "default": "",
          "examples": [
            "123e4567-e89b-12d3-a456-426655440000"
          ],
          "pattern": "(([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|Not Set|null|Null)",
          "title": "The Replay Parent Id Schema",
          "type": [
            "string",
            "null"
          ]
        },
        "replay_parent_type": {
          "$id": "#/properties/replay_parent_type",
          "enum": [
            "TRIAL",
            "REPLAY",
            null
          ],
          "title": "The Replay Parent Type Schema",
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "$id": "#/properties/source",
          "default": "",
          "examples": [
            "simulator"
          ],
          "pattern": "^(.*)$",
          "title": "The Source Schema",
          "type": "string"
        },
        "sub_type": {
          "$id": "#/properties/sub_type",
          "const": "Event:dialogue_event",
          "default": "",
          "examples": [
            "equip",
            "triage"
          ],
          "pattern": "^([a-zA-Z0-9_:]*?)$",
          "title": "The Sub Type Schema",
          "type": "string"
        },
        "timestamp": {
          "$id": "#/properties/timestamp",
          "default": "",
          "examples": [
            "2019-12-26T14:05:02.3412Z"
          ],
          "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.]?[0-9]{0,}?Z",
          "title": "The Timestamp Schema",
          "type": "string"
        },
        "trial_id": {
          "$id": "#/properties/trial_id",
          "default": "",
          "examples": [
            "123e4567-e89b-12d3-a456-426655440000"
          ],
          "pattern": "(([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|Not Set|null|Null)",
          "title": "The Trial Id Schema",
          "type": "string"
        },
        "version": {
          "$id": "#/properties/version",
          "default": "",
          "examples": [
            "0.1",
            "1.0.1"
          ],
          "pattern": "^([.]*)|(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
          "title": "The Version Schema",
          "type": "string"
        }
      },
      "required": [
        "experiment_id",
        "timestamp",
        "source",
        "sub_type",
        "version"
      ],
      "title": "The Event Message Schema",
      "type": "object",
      "version": "0.5"
    }
  },
  "required": [
    "header",
    "msg",
    "data"
  ],
  "title": "The Chat Analysis Message schema",
  "type": "object",
  "version": "0.1"
}
Upstream spec documentation

Chat Analysis Message

This is the format of the output messages generated by the Dialog Agent when processing files or Message Bus messages.

Message Bus Publishing Topic

Analysis of Message Bus messages is published on the Message Bus topic:

agent/dialog

Fields

Field Name Type Description
header.timestamp string Time of processing by Dialog Agent, in ISO 8601 format: YYYY-MM-DDTHH:MM:SS.SSSZ
header.message_type string Message type. Hardcoded to "event"
header.version string Dialog Agent software version. Hardcoded to "1.0"
msg.experiment_id string The experiment id this message is associated with
msg.trial_id string The trial id this message is associated with
msg.timestamp string same as header.timestamp
msg.source string The name of this testbed component. Hardcoded to "tomcat_textAnalyzer"
msg.sub_type string The subtype of the data. Hardcoded to "Event:dialogue_event"
msg.version string Same as header.version
msg.replay_root_id string The replay_root_id if being used for the root of a replay.
msg.replay_id string The replay_id if being used for a replay.
data.participant_id string The participant who generated the message text
data.asr_msg_id string A version 4 UUID associated with this message
data.text string The text to be processed by the Dialog Agent
data.utterance_source.source_type string File or Message Bus
data.utterance_source.source_name string A filename or Message Bus topic
data.extractions Seq[Extraction] Analysis of message text

Extraction Fields

Field Name Type Description
span string The substring of data.text corresponding to the extraction.
labels string array All labels applied to the span by the rule-based system, in ascending order of their place on the taxonomy hierarchy - i.e., from specific to general.
arguments map[string, extractions] Recursive event arguments
start_offset int the starting index of the span in the data text
end_offset int The ending index of the span in the data text

Example

{
  "header": {
    "timestamp": "2021-10-07T18:27:42.843Z",
    "message_type": "event",
    "version": "1.1"
  },
  "msg": {
    "experiment_id": "367624f8-81cd-4661-a03f-b61908c39581",
    "trial_id": "78822ceb-448a-436e-a1f1-f154f2066261",
    "timestamp": "2021-10-07T18:27:42.843Z",
    "source": "tomcat_textAnalyzer",
    "sub_type": "Event:dialogue_event",
    "version": "3.0.1",
    "replay_root_id": "",
    "replay_id": ""
  },
  "data": {
    "participant_id": "P00012",
    "asr_msg_id": "bc36d1aa-25e6-11ec-ab58-7831c1b845fe",
    "text": "I'm going to room 204.",
    "dialog_act_label": "Statement",
    "utterance_source": {
      "source_type": "message_bus",
      "source_name": "agent/asr/final"
    },
    "extractions": [
      {
        "labels": [
          "MoveTo",
          "Move",
          "SimpleActions",
          "Action",
          "EventLike",
          "Concept"
        ],
        "span": "going to room 204",
        "arguments": {
          "target": [
            {
              "labels": [
                "NumberedRoom",
                "Room",
                "Infrastructure",
                "Location",
                "EventLike",
                "Concept"
              ],
              "span": "room 204",
              "arguments": {
                "number": [
                  {
                    "labels": [
                      "Number",
                      "Concept"
                    ],
                    "span": "204",
                    "arguments": {},
                    "attachments": [],
                    "start_offset": 18,
                    "end_offset": 21,
                    "rule": "numbers"
                  }
                ]
              },
              "attachments": [],
              "start_offset": 13,
              "end_offset": 21,
              "rule": "room_numbered"
            }
          ]
        },
        "attachments": [
          "{\"text\":\"I\",\"agentType\":\"Self\",\"labels\":[\"Self\",\"Entity\",\"Concept\"],\"span\":[0]}"
        ],
        "start_offset": 4,
        "end_offset": 21,
        "rule": "move_nmod_action"
      },
      {
        "labels": [
          "NumberedRoom",
          "Room",
          "Infrastructure",
          "Location",
          "EventLike",
          "Concept"
        ],
        "span": "room 204",
        "arguments": {
          "number": [
            {
              "labels": [
                "Number",
                "Concept"
              ],
              "span": "204",
              "arguments": {},
              "attachments": [],
              "start_offset": 18,
              "end_offset": 21,
              "rule": "numbers"
            }
          ]
        },
        "attachments": [],
        "start_offset": 13,
        "end_offset": 21,
        "rule": "room_numbered"
      },
      {
        "labels": [
          "Room",
          "Infrastructure",
          "Location",
          "EventLike",
          "Concept"
        ],
        "span": "room",
        "arguments": {},
        "attachments": [],
        "start_offset": 13,
        "end_offset": 17,
        "rule": "room_detection"
      }
    ]
  }
}