{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/apache-opennlp/refs/heads/main/json-schema/apache-opennlp-named-entity-schema.json",
  "title": "NamedEntity",
  "description": "NamedEntity schema from Apache OpenNLP",
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "description": "Entity text",
      "example": "Pierre Vinken"
    },
    "type": {
      "type": "string",
      "description": "Entity type",
      "example": "person",
      "enum": [
        "person",
        "location",
        "organization",
        "date",
        "time",
        "money",
        "percent",
        "misc"
      ]
    },
    "start": {
      "type": "integer",
      "description": "Start token index",
      "example": 0
    },
    "end": {
      "type": "integer",
      "description": "End token index (exclusive)",
      "example": 2
    },
    "probability": {
      "type": "number",
      "description": "Confidence score",
      "example": 0.95
    }
  }
}