{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/apache-opennlp/refs/heads/main/json-structure/apache-opennlp-language-detection-result-structure.json",
  "description": "LanguageDetectionResult schema from Apache OpenNLP",
  "type": "object",
  "properties": {
    "bestLanguage": {
      "type": "string",
      "description": "ISO-639-3 code of most likely language",
      "example": "eng"
    },
    "confidence": {
      "type": "double",
      "description": "Confidence score 0-1",
      "example": 0.98
    },
    "languages": {
      "type": "array",
      "description": "All detected languages with probabilities",
      "items": {
        "$ref": "#/components/schemas/LanguageProbability"
      }
    }
  },
  "name": "LanguageDetectionResult"
}