{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "LSDL Schema",
  "description": "Linguistic Schema Definition Language schema",
  "type": "object",
  "properties": {
    "Version": {
      "description": "Version of LSDL",
      "enum": ["2.0.0"]
    },
    "Language": {
      "description": "Target language for the linguistic schema",
      "type": "string",
      "pattern": "^[A-Za-z][A-Za-z]+(-[A-Za-z0-9][A-Za-z0-9]+)*$",
      "format": "language"
    },
    "DynamicImprovement": {
      "description": "Indicates which heuristics should be run to automatically improve the linguistic schema.",
      "enum": ["Default", "Full", "HighConfidence", "None"],
      "default": "Default"
    },
    "MinResultConfidence": {
      "description": "Indicates the confidence score required for an interpretation of an utterance to be returned.",
      "enum": ["Default", "VeryHigh", "High", "Medium", "Low"],
      "default": "Default"
    },
    "Namespaces": {
      "description": "Additional linguistic schemas referenced by objects within this linguistic schema",
      "$ref": "#/definitions/namespaces"
    },
    "Entities": {
      "description": "The entities in the linguistic schema.",
      "$ref": "#/definitions/entities"
    },
    "Relationships": {
      "description": "The relationships in the linguistic schema.",
      "$ref": "#/definitions/relationships"
    },
    "GlobalSubstitutions": {
      "description": "The global text substitutions in the linguistic schema.",
      "$ref": "#/definitions/globalSubstitutions"
    },
    "Examples": {
      "description": "Examples associated with the linguistic schema.",
      "$ref": "#/definitions/examples"
    }
  },
  "required": ["Version", "Language"],
  "additionalProperties": false,
  "definitions": {
    "identifier": {
      "description": "Identifier for a linguistic schema object",
      "type": "string",
      "pattern": "^.+$",
      "format": "identifier"
    },
    "modelItemReference": {
      "description": "Name of the conceptual model object to which the linguistic schema object is bound",
      "type": "string"
    },
    "nonEmptyString": {
      "type": "string",
      "minLength": 1
    },
    "state": {
      "description": "Indicates the state of an object in the linguistic schema.",
      "enum": ["Authored", "Generated", "Suggested", "Deleted"],
      "default": "Authored"
    },
    "source": {
      "description": "Indicates who/what created the object in the linguistic schema.",
      "oneOf": [
        {
          "$ref": "#/definitions/sourceType"
        },
        {
          "$ref": "#/definitions/fullSource"
        }
      ]
    },
    "fullSource": {
      "description": "Indicates who/what created the object in the linguistic schema.",
      "type": "object",
      "properties": {
        "Type": {
          "$ref": "#/definitions/sourceType"
        },
        "Agent": {
          "description": "Specific name of the agent that created the object.",
          "type": "string"
        }
      }
    },
    "sourceType": {
      "description": "Indicates the type of the creator of the object",
      "enum": ["Default", "User", "Internal", "External"],
      "default": "Default"
    },
    "weight": {
      "description": "Indicates a weight to apply to an object when selecting between ambiguous alternatives. A higher weight is a stronger preference for selecting the object.",
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "default": 1
    },
    "templateSchema": {
      "description": "Identifies the shared template schema from which an object in the linguistic schema is derived",
      "type": "string"
    },
    "dateTime": {
      "description": "Date and time in UTC",
      "type": "string",
      "format": "date-time"
    },
    "namespaces": {
      "description": "A set of references to additional linguistic schemas that may be referenced by objects in this linguistic schema",
      "type": "object",
      "patternProperties": {
        "^.+$": {
          "$ref": "#/definitions/lsdlReference"
        }
      },
      "additionalProperties": false,
      "format": "identifier-properties"
    },
    "lsdlReference": {
      "description": "A reference to an additional linguistic schema.",
      "type": "object",
      "additionalProperties": false
    },
    "entities": {
      "description": "The entities in the linguistic schema",
      "type": "object",
      "patternProperties": {
        "^.+$": {
          "$ref": "#/definitions/entity"
        }
      },
      "additionalProperties": false,
      "format": "identifier-properties",
      "minProperties": 1
    },
    "entity": {
      "description": "An entity in the linguistic schema",
      "type": "object",
      "properties": {
        "Definition": {
          "$ref": "#/definitions/entityDefinition"
        },
        "State": {
          "description": "The state of the entity",
          "$ref": "#/definitions/state"
        },
        "Hidden": {
          "description": "Indicates the entity is hidden. Hidden entities are ignored for all purposes other than being available nodes along paths between other related entities.",
          "type": "boolean"
        },
        "Weight": {
          "description": "The weight to apply to this entity",
          "$ref": "#/definitions/weight"
        },
        "TemplateSchema": {
          "description": "Identifies the shared template schema from which this entity is derived",
          "$ref": "#/definitions/templateSchema"
        },
        "Terms": {
          "description": "Terms which can be used to refer to this entity",
          "$ref": "#/definitions/terms"
        },
        "SemanticType": {
          "description": "The overall semantic category of the entity",
          "enum": [
            "Person",
            "Animate",
            "Inanimate",
            "Location",
            "Time",
            "Duration"
          ]
        },
        "Units": {
          "description": "Nouns which indicate the units represented in this numeric property entity.",
          "$ref": "#/definitions/terms"
        },
        "Instances": {
          "description": "Defines how instance values from the model are recognized",
          "$ref": "#/definitions/instances"
        }
      },
      "required": ["Definition"],
      "additionalProperties": false
    },
    "entityDefinition": {
      "description": "The definition for the entity",
      "$ref": "#/definitions/bindingEntityDefinition"
    },
    "bindingEntityDefinition": {
      "type": "object",
      "properties": {
        "Binding": {
          "description": "The conceptual model object binding",
          "oneOf": [
            {
              "$ref": "#/definitions/conceptualEntityBinding"
            },
            {
              "$ref": "#/definitions/conceptualPropertyBinding"
            },
            {
              "$ref": "#/definitions/hierarchyBinding"
            },
            {
              "$ref": "#/definitions/hierarchyLevelBinding"
            }
          ]
        }
      },
      "required": ["Binding"],
      "additionalProperties": false
    },
    "conceptualEntityBinding": {
      "description": "A conceptual entity or table in the conceptual model to which a linguistic schema object is bound",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "Table": {
              "description": "The name of the table.",
              "$ref": "#/definitions/modelItemReference"
            }
          },
          "required": ["Table"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "ConceptualEntity": {
              "description": "The name of the conceptual entity (e.g. table or pod)",
              "$ref": "#/definitions/modelItemReference"
            }
          },
          "required": ["ConceptualEntity"],
          "additionalProperties": false
        }
      ]
    },
    "conceptualPropertyBinding": {
      "description": "A conceptual property, column, or measure in the conceptual model to which a linguistic schema object is bound.",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "Table": {
              "description": "The name of the table containing the column or measure",
              "$ref": "#/definitions/modelItemReference"
            },
            "VariationSource": {
              "description": "The name of the property containing the variation set that contains the column or measure",
              "$ref": "#/definitions/modelItemReference"
            },
            "VariationSet": {
              "description": "The name of the variation set that contains the column or measure",
              "$ref": "#/definitions/modelItemReference"
            },
            "Column": {
              "description": "The name of the column",
              "$ref": "#/definitions/modelItemReference"
            }
          },
          "required": ["Table", "Column"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "Table": {
              "description": "The name of the table containing the column or measure",
              "$ref": "#/definitions/modelItemReference"
            },
            "VariationSource": {
              "description": "The name of the property containing the variation set that contains the column or measure",
              "$ref": "#/definitions/modelItemReference"
            },
            "VariationSet": {
              "description": "The name of the variation set that contains the column or measure",
              "$ref": "#/definitions/modelItemReference"
            },
            "Measure": {
              "description": "The name of the measure",
              "$ref": "#/definitions/modelItemReference"
            }
          },
          "required": ["Table", "Measure"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "ConceptualEntity": {
              "description": "The name of the conceptual entity containing the property",
              "$ref": "#/definitions/modelItemReference"
            },
            "VariationSource": {
              "description": "The name of the property containing the variation set that contains the property",
              "$ref": "#/definitions/modelItemReference"
            },
            "VariationSet": {
              "description": "The name of the variation set that contains the property",
              "$ref": "#/definitions/modelItemReference"
            },
            "ConceptualProperty": {
              "description": "The name of the property",
              "$ref": "#/definitions/modelItemReference"
            }
          },
          "required": ["ConceptualEntity", "ConceptualProperty"],
          "additionalProperties": false
        }
      ]
    },
    "hierarchyBinding": {
      "description": "A hierarchy in the conceptual model to which a linguistic schema object is bound",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "Table": {
              "description": "The name of the table containing the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            },
            "VariationSource": {
              "description": "The name of the property containing the variation set that contains the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            },
            "VariationSet": {
              "description": "The name of the variation set that contains the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            },
            "Hierarchy": {
              "description": "The name of the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            }
          },
          "required": ["Table", "Hierarchy"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "ConceptualEntity": {
              "description": "The name of the conceptual entity containing the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            },
            "VariationSource": {
              "description": "The name of the property containing the variation set that contains the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            },
            "VariationSet": {
              "description": "The name of the variation set that contains the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            },
            "Hierarchy": {
              "description": "The name of the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            }
          },
          "required": ["ConceptualEntity", "Hierarchy"],
          "additionalProperties": false
        }
      ]
    },
    "hierarchyLevelBinding": {
      "description": "A hierarchy level in the conceptual model to which a linguistic schema object is bound",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "Table": {
              "description": "The name of the table containing the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            },
            "VariationSource": {
              "description": "The name of the property containing the variation set that contains the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            },
            "VariationSet": {
              "description": "The name of the variation set that contains the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            },
            "Hierarchy": {
              "description": "The name of the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            },
            "HierarchyLevel": {
              "description": "The name of the hierarchy level",
              "$ref": "#/definitions/modelItemReference"
            }
          },
          "required": ["Table", "Hierarchy", "HierarchyLevel"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "ConceptualEntity": {
              "description": "The name of the conceptual entity containing the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            },
            "VariationSource": {
              "description": "The name of the property containing the variation set that contains the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            },
            "VariationSet": {
              "description": "The name of the variation set that contains the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            },
            "Hierarchy": {
              "description": "The name of the hierarchy",
              "$ref": "#/definitions/modelItemReference"
            },
            "HierarchyLevel": {
              "description": "The name of the hierarchy level",
              "$ref": "#/definitions/modelItemReference"
            }
          },
          "required": ["ConceptualEntity", "Hierarchy", "HierarchyLevel"],
          "additionalProperties": false
        }
      ]
    },
    "terms": {
      "description": "A list of terms in the linguistic schema",
      "type": "array",
      "items": {
        "$ref": "#/definitions/term"
      },
      "minItems": 1
    },
    "term": {
      "description": "A term in the linguistic schema",
      "oneOf": [
        {
          "$ref": "#/definitions/nonEmptyString"
        },
        {
          "$ref": "#/definitions/fullTerm"
        }
      ]
    },
    "fullTerm": {
      "description": "A term in the linguistic schema",
      "type": "object",
      "patternProperties": {
        "^.+$": {
          "description": "Properties of the term",
          "$ref": "#/definitions/termProperties"
        }
      },
      "additionalProperties": false,
      "minProperties": 1,
      "maxProperties": 1
    },
    "termProperties": {
      "description": "Properties of a term in the linguistic schema",
      "type": "object",
      "properties": {
        "Type": {
          "description": "The part of speech of the term",
          "enum": ["Noun", "Verb", "Adjective", "Preposition"]
        },
        "State": {
          "description": "The state of the term",
          "$ref": "#/definitions/state"
        },
        "Source": {
          "description": "The source of the term",
          "$ref": "#/definitions/source"
        },
        "Weight": {
          "description": "The weight to apply to the term",
          "$ref": "#/definitions/weight"
        },
        "TemplateSchema": {
          "description": "Identifies the shared template schema from which the term is derived",
          "$ref": "#/definitions/templateSchema"
        },
        "LastModified": {
          "description": "Indicates the last date and time (in UTC) that this term was modified.",
          "$ref": "#/definitions/dateTime"
        }
      },
      "additionalProperties": false
    },
    "instances": {
      "description": "Defines how instance values from the model are recognized",
      "type": "object",
      "properties": {
        "Index": {
          "description": "Indicates whether the values of this entity should be available in the term index, enabling recognition, completion, and suggestions.",
          "enum": ["Default", "None"],
          "default": "Default"
        },
        "PluralNormalization": {
          "description": "Indicates whether values that appear to be plural should match singular words in the utterance.",
          "enum": ["Default", "Normalized", "None"],
          "default": "Default"
        },
        "Synonyms": {
          "description": "Defines a set of values which are synonyms of instances of this entity.",
          "$ref": "#/definitions/instanceSynonyms"
        },
        "Weights": {
          "description": "Reference to property in the model which contains the weight to apply to instances of this entity.",
          "$ref": "#/definitions/instanceWeights"
        }
      },
      "additionalProperties": false
    },
    "instanceSynonyms": {
      "description": "A pair of properties that contain synonyms for the instances of an entity.",
      "type": "object",
      "properties": {
        "SynonymBinding": {
          "description": "The conceptual model object which contains terms that can be used to refer to values of the entity",
          "$ref": "#/definitions/conceptualPropertyBinding"
        },
        "ValueBinding": {
          "description": "The conceptual model object which contains the corresponding values of the entity",
          "$ref": "#/definitions/conceptualPropertyBinding"
        },
        "State": {
          "description": "The state of the instance synonyms",
          "$ref": "#/definitions/state"
        }
      },
      "required": ["SynonymBinding", "ValueBinding"],
      "additionalProperties": false
    },
    "instanceWeights": {
      "description": "A reference to column in the model that contains the weight to apply to instances of this entity when selecting between ambiguous alternative instances. A higher weight is a stronger preference for selecting this instance of this entity.",
      "type": "object",
      "properties": {
        "Binding": {
          "description": "The conceptual model object which contains the instance weights corresponding to instances of the entity",
          "$ref": "#/definitions/conceptualPropertyBinding"
        }
      },
      "required": ["Binding"],
      "additionalProperties": false
    },
    "relationships": {
      "description": "The relationships in the linguistic schema",
      "type": "object",
      "patternProperties": {
        "^.+$": {
          "$ref": "#/definitions/relationship"
        }
      },
      "additionalProperties": false,
      "format": "identifier-properties",
      "minProperties": 1
    },
    "relationship": {
      "description": "A relationship in the linguistic schema",
      "type": "object",
      "properties": {
        "Binding": {
          "description": "The conceptual model object which embodies the relationship",
          "oneOf": [
            {
              "$ref": "#/definitions/conceptualEntityBinding"
            }
          ]
        },
        "State": {
          "description": "The state of the relationship",
          "$ref": "#/definitions/state"
        },
        "Weight": {
          "description": "The weight to apply to this relationship",
          "$ref": "#/definitions/weight"
        },
        "TemplateSchema": {
          "description": "Identifies the shared template schema from which this relationship is derived",
          "$ref": "#/definitions/templateSchema"
        },
        "Roles": {
          "description": "References to linguistic entities which participate in the relationship",
          "$ref": "#/definitions/roles"
        },
        "SemanticSlots": {
          "description": "Defines how roles fill common semantic slots in the relationship",
          "$ref": "#/definitions/semanticSlots"
        },
        "Conditions": {
          "description": "A set of conditions which are required to be true for instances of the relationship represented in the semantic model",
          "$ref": "#/definitions/conditions"
        },
        "Phrasings": {
          "description": "A set of syntactic frames which define the types of language used to describe the relationship",
          "$ref": "#/definitions/phrasings"
        }
      },
      "additionalProperties": false
    },
    "roles": {
      "description": "The roles in a linguistic relationship",
      "type": "object",
      "patternProperties": {
        "^.+$": {
          "$ref": "#/definitions/role"
        }
      },
      "additionalProperties": false,
      "format": "identifier-properties",
      "minProperties": 1
    },
    "role": {
      "description": "A role in a linguistic relationship.",
      "oneOf": [
        {
          "$ref": "#/definitions/identifier"
        },
        {
          "$ref": "#/definitions/fullRole"
        }
      ]
    },
    "fullRole": {
      "description": "A role in a linguistic relationship.",
      "type": "object",
      "properties": {
        "Target": {
          "description": "The linguistic entity which is the target of the role",
          "$ref": "#/definitions/entityReference"
        },
        "Nouns": {
          "description": "Nouns which can be used to refer to the entity which is the target of the role, when used in the context of the relationship",
          "$ref": "#/definitions/terms"
        },
        "Quantity": {
          "description": "A role which indicates the quantity of this role's entity which participates in the relationship",
          "$ref": "#/definitions/roleReference"
        },
        "Amount": {
          "description": "A role which indicates the amount of this role's entity which participates in the relationship",
          "$ref": "#/definitions/roleReference"
        }
      },
      "required": ["Target"],
      "additionalProperties": false
    },
    "entityReference": {
      "description": "A reference to an entity in a linguistic relationship",
      "oneOf": [
        {
          "$ref": "#/definitions/identifier"
        },
        {
          "$ref": "#/definitions/fullEntityReference"
        }
      ]
    },
    "fullEntityReference": {
      "description": "A reference to an entity in a linguistic relationship",
      "type": "object",
      "properties": {
        "Entity": {
          "description": "The name of the entity",
          "$ref": "#/definitions/identifier"
        },
        "Namespace": {
          "description": "The name of the namespace of the linguistic schema that contains the entity",
          "$ref": "#/definitions/identifier"
        }
      },
      "required": ["Entity"],
      "additionalProperties": false
    },
    "semanticSlots": {
      "description": "Defines how roles fill certain common semantic slots (aka thematic relations) in the relationship",
      "type": "object",
      "properties": {
        "Where": {
          "description": "A role which indicates where the relationship takes place",
          "$ref": "#/definitions/roleReference"
        },
        "When": {
          "description": "A role which indicates when the relationship takes place",
          "$ref": "#/definitions/roleReference"
        },
        "Duration": {
          "description": "A role which indicates how long the relationship occurred",
          "$ref": "#/definitions/roleReference"
        },
        "Occurrences": {
          "description": "A role which indicates the number of times the relationship occurred",
          "$ref": "#/definitions/roleReference"
        }
      },
      "additionalProperties": false
    },
    "conditions": {
      "description": "The conditions on a relationship",
      "type": "array",
      "items": {
        "$ref": "#/definitions/condition"
      },
      "minItems": 1,
      "maxItems": 1
    },
    "condition": {
      "description": "A filter on a relationship that defines the circumstances under which a row in the semantic model represents an instance of the relationship",
      "type": "object",
      "properties": {
        "Target": {
          "description": "A role in the relationship to compare to the value",
          "$ref": "#/definitions/roleReference"
        },
        "Aggregation": {
          "description": "An aggregate function applied to the role",
          "enum": [
            "None",
            "Sum",
            "Average",
            "Count",
            "Min",
            "Max",
            "Median",
            "Variance",
            "StandardDeviation"
          ]
        },
        "Operator": {
          "description": "The operator with which to compare the value and the role",
          "enum": [
            "Equals",
            "NotEquals",
            "GreaterThan",
            "LessThan",
            "GreaterThanOrEquals",
            "LessThanOrEquals",
            "Contains",
            "NotContains",
            "StartsWith",
            "NotStartsWith"
          ]
        },
        "Value": {
          "description": "The value to which the role is compared",
          "$ref": "#/definitions/value"
        }
      },
      "required": ["Target", "Operator", "Value"],
      "additionalProperties": false
    },
    "value": {
      "description": "A literal value to use in a condition",
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "Text": {
              "description": "A text value to use in a condition",
              "$ref": "#/definitions/textValues"
            }
          },
          "required": ["Text"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "Number": {
              "description": "A number value to use in a condition",
              "$ref": "#/definitions/numberValues"
            }
          },
          "required": ["Number"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "Boolean": {
              "description": "A Boolean value to use in a condition",
              "$ref": "#/definitions/booleanValues"
            }
          },
          "required": ["Boolean"],
          "additionalProperties": false
        },
        {
          "$ref": "#/definitions/textValues"
        },
        {
          "$ref": "#/definitions/numberValues"
        },
        {
          "$ref": "#/definitions/booleanValues"
        },
        {
          "type": "null"
        }
      ]
    },
    "textValues": {
      "description": "One or more text values to use in a condition",
      "oneOf": [
        {
          "$ref": "#/definitions/nullableTextValue"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/definitions/nullableTextValue"
          },
          "minItems": 1,
          "maxItems": 1
        }
      ]
    },
    "nullableTextValue": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "numberValues": {
      "description": "One or more number values to use in a condition",
      "oneOf": [
        {
          "$ref": "#/definitions/nullableNumberValue"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/definitions/nullableNumberValue"
          },
          "minItems": 1,
          "maxItems": 1
        }
      ]
    },
    "nullableNumberValue": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "booleanValues": {
      "description": "One or more Boolean values to use in a condition",
      "oneOf": [
        {
          "$ref": "#/definitions/nullableBooleanValue"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/definitions/nullableBooleanValue"
          },
          "minItems": 1,
          "maxItems": 1
        }
      ]
    },
    "nullableBooleanValue": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "phrasings": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/phrasing"
      },
      "minItems": 1
    },
    "phrasing": {
      "description": "The phrasings on a linguistic relationship",
      "oneOf": [
        {
          "$ref": "#/definitions/attributePhrasing"
        },
        {
          "$ref": "#/definitions/namePhrasing"
        },
        {
          "$ref": "#/definitions/adjectivePhrasing"
        },
        {
          "$ref": "#/definitions/dynamicAdjectivePhrasing"
        },
        {
          "$ref": "#/definitions/nounPhrasing"
        },
        {
          "$ref": "#/definitions/dynamicNounPhrasing"
        },
        {
          "$ref": "#/definitions/prepositionPhrasing"
        },
        {
          "$ref": "#/definitions/verbPhrasing"
        }
      ]
    },
    "phrasingProperties": {
      "type": "object",
      "properties": {
        "State": {
          "description": "The state of the phrasing",
          "$ref": "#/definitions/state"
        },
        "Weight": {
          "description": "The weight to apply to the phrasing",
          "$ref": "#/definitions/weight"
        },
        "TemplateSchema": {
          "description": "Identifies the shared template schema from which the phrasing is derived",
          "$ref": "#/definitions/templateSchema"
        }
      }
    },
    "attributePhrasing": {
      "description": "An attribute phrasing on a linguistic relationship",
      "type": "object",
      "allOf": [
        {
          "properties": {
            "Attribute": {
              "$ref": "#/definitions/attributePhrasingProperties"
            },
            "State": {},
            "Weight": {},
            "TemplateSchema": {}
          },
          "additionalProperties": false,
          "required": ["Attribute"]
        },
        {
          "$ref": "#/definitions/phrasingProperties"
        }
      ]
    },
    "attributePhrasingProperties": {
      "description": "Properties of an attribute phrasing",
      "type": "object",
      "properties": {
        "Subject": {
          "description": "The entity which is the subject of the phrasing",
          "$ref": "#/definitions/roleReference"
        },
        "Object": {
          "description": "The entity which is the object of the phrasing",
          "$ref": "#/definitions/roleReference"
        },
        "PrepositionalPhrases": {
          "description": "Additional prepositional phrases which apply to the phrasing",
          "$ref": "#/definitions/prepPhrases"
        }
      },
      "required": ["Subject", "Object"],
      "additionalProperties": false
    },
    "namePhrasing": {
      "description": "A name phrasing on a linguistic relationship",
      "type": "object",
      "allOf": [
        {
          "properties": {
            "Name": {
              "$ref": "#/definitions/namePhrasingProperties"
            },
            "State": {},
            "Weight": {},
            "TemplateSchema": {}
          },
          "additionalProperties": false,
          "required": ["Name"]
        },
        {
          "$ref": "#/definitions/phrasingProperties"
        }
      ]
    },
    "namePhrasingProperties": {
      "description": "Properties of a name phrasing",
      "type": "object",
      "properties": {
        "Subject": {
          "description": "The entity which is the subject of the phrasing",
          "$ref": "#/definitions/roleReference"
        },
        "Name": {
          "description": "The entity which is the name of the Subject",
          "$ref": "#/definitions/roleReference"
        }
      },
      "required": ["Subject", "Name"],
      "additionalProperties": false
    },
    "adjectivePhrasing": {
      "description": "An adjective phrasing on a linguistic relationship",
      "type": "object",
      "allOf": [
        {
          "properties": {
            "Adjective": {
              "$ref": "#/definitions/adjectivePhrasingProperties"
            },
            "State": {},
            "Weight": {},
            "TemplateSchema": {}
          },
          "additionalProperties": false,
          "required": ["Adjective"]
        },
        {
          "$ref": "#/definitions/phrasingProperties"
        }
      ]
    },
    "adjectivePhrasingProperties": {
      "description": "Properties of an adjective phrasing",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "Subject": {
              "description": "The entity which is described via an adjective",
              "$ref": "#/definitions/roleReference"
            },
            "Adjectives": {
              "description": "Adjectives used to describe the Subject (with a high measurement)",
              "$ref": "#/definitions/terms"
            },
            "Antonyms": {
              "description": "Adjectives used to describe the Subject (with a low measurement)",
              "$ref": "#/definitions/terms"
            },
            "Measurement": {
              "description": "The entity which measures the extent to which the Adjectives apply",
              "$ref": "#/definitions/roleReference"
            },
            "PrepositionalPhrases": {
              "description": "Additional prepositional phrases which apply to the phrasing",
              "$ref": "#/definitions/prepPhrases"
            }
          },
          "required": ["Subject", "Adjectives"],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "Subject": {
              "description": "The entity which is described via an adjective",
              "$ref": "#/definitions/roleReference"
            },
            "Antonyms": {
              "description": "Adjectives used to describe the Subject (with a low measurement)",
              "$ref": "#/definitions/terms"
            },
            "Measurement": {
              "description": "The entity which measures the extent to which the Adjectives apply",
              "$ref": "#/definitions/roleReference"
            },
            "PrepositionalPhrases": {
              "description": "Additional prepositional phrases which apply to the phrasing",
              "$ref": "#/definitions/prepPhrases"
            }
          },
          "required": ["Subject", "Antonyms"],
          "additionalProperties": false
        }
      ]
    },
    "dynamicAdjectivePhrasing": {
      "description": "A dynamic adjective phrasing on a linguistic relationship",
      "type": "object",
      "allOf": [
        {
          "properties": {
            "DynamicAdjective": {
              "$ref": "#/definitions/dynamicAdjectivePhrasingProperties"
            },
            "State": {},
            "Weight": {},
            "TemplateSchema": {}
          },
          "additionalProperties": false,
          "required": ["DynamicAdjective"]
        },
        {
          "$ref": "#/definitions/phrasingProperties"
        }
      ]
    },
    "dynamicAdjectivePhrasingProperties": {
      "description": "Properties of a dynamic adjective phrasing",
      "type": "object",
      "properties": {
        "Subject": {
          "description": "The entity which is described via an adjective",
          "$ref": "#/definitions/roleReference"
        },
        "Adjective": {
          "description": "The column entity (or table entity with a name phrasing) which is used to describe the Subject",
          "$ref": "#/definitions/roleReference"
        },
        "PrepositionalPhrases": {
          "description": "Additional prepositional phrases which apply to the phrasing",
          "$ref": "#/definitions/prepPhrases"
        }
      },
      "required": ["Subject", "Adjective"],
      "additionalProperties": false
    },
    "nounPhrasing": {
      "description": "A noun phrasing on a linguistic relationship",
      "type": "object",
      "allOf": [
        {
          "properties": {
            "Noun": {
              "$ref": "#/definitions/nounPhrasingProperties"
            },
            "State": {},
            "Weight": {},
            "TemplateSchema": {}
          },
          "additionalProperties": false,
          "required": ["Noun"]
        },
        {
          "$ref": "#/definitions/phrasingProperties"
        }
      ]
    },
    "nounPhrasingProperties": {
      "description": "Properties of a noun phrasing",
      "type": "object",
      "properties": {
        "Subject": {
          "description": "The entity which is described via a noun",
          "$ref": "#/definitions/roleReference"
        },
        "Nouns": {
          "description": "Nouns used to describe the Subject",
          "$ref": "#/definitions/terms"
        },
        "PrepositionalPhrases": {
          "description": "Additional prepositional phrases which apply to the phrasing",
          "$ref": "#/definitions/prepPhrases"
        }
      },
      "required": ["Subject", "Nouns"],
      "additionalProperties": false
    },
    "dynamicNounPhrasing": {
      "description": "A dynamic noun phrasing on a linguistic relationship",
      "type": "object",
      "allOf": [
        {
          "properties": {
            "DynamicNoun": {
              "$ref": "#/definitions/dynamicNounPhrasingProperties"
            },
            "State": {},
            "Weight": {},
            "TemplateSchema": {}
          },
          "additionalProperties": false,
          "required": ["DynamicNoun"]
        },
        {
          "$ref": "#/definitions/phrasingProperties"
        }
      ]
    },
    "dynamicNounPhrasingProperties": {
      "description": "Properties of a dynamic noun phrasing",
      "type": "object",
      "properties": {
        "Subject": {
          "description": "The entity which is described via a noun",
          "$ref": "#/definitions/roleReference"
        },
        "Noun": {
          "description": "The column entity (or table entity with a name phrasing) which is the used to describe the Subject",
          "$ref": "#/definitions/roleReference"
        },
        "PrepositionalPhrases": {
          "description": "Additional prepositional phrases which apply to the phrasing",
          "$ref": "#/definitions/prepPhrases"
        }
      },
      "required": ["Subject", "Noun"],
      "additionalProperties": false
    },
    "prepositionPhrasing": {
      "description": "A preposition phrasing on a linguistic relationship",
      "type": "object",
      "allOf": [
        {
          "properties": {
            "Preposition": {
              "$ref": "#/definitions/prepositionPhrasingProperties"
            },
            "State": {},
            "Weight": {},
            "TemplateSchema": {}
          },
          "additionalProperties": false,
          "required": ["Preposition"]
        },
        {
          "$ref": "#/definitions/phrasingProperties"
        }
      ]
    },
    "prepositionPhrasingProperties": {
      "description": "Properties of a preposition phrasing",
      "type": "object",
      "properties": {
        "Subject": {
          "description": "The entity which is the subject of the prepositional phrase",
          "$ref": "#/definitions/roleReference"
        },
        "Prepositions": {
          "description": "Prepositions used in the prepositional phrase",
          "$ref": "#/definitions/terms"
        },
        "Object": {
          "description": "The entity which is the object of the prepositional phrase",
          "$ref": "#/definitions/roleReference"
        },
        "PrepositionalPhrases": {
          "description": "Additional prepositional phrases which apply to the phrasing",
          "$ref": "#/definitions/prepPhrases"
        }
      },
      "required": ["Subject", "Prepositions", "Object"],
      "additionalProperties": false
    },
    "verbPhrasing": {
      "description": "A verb phrasing on a linguistic relationship",
      "type": "object",
      "allOf": [
        {
          "properties": {
            "Verb": {
              "$ref": "#/definitions/verbPhrasingProperties"
            },
            "State": {},
            "Weight": {},
            "TemplateSchema": {}
          },
          "additionalProperties": false,
          "required": ["Verb"]
        },
        {
          "$ref": "#/definitions/phrasingProperties"
        }
      ]
    },
    "verbPhrasingProperties": {
      "description": "Properties of a verb phrasing",
      "type": "object",
      "properties": {
        "Subject": {
          "description": "The entity which is the subject of the verb",
          "$ref": "#/definitions/roleReference"
        },
        "Verbs": {
          "description": "Verbs used to describe the relationship",
          "$ref": "#/definitions/terms"
        },
        "IndirectObject": {
          "description": "The entity which is the indirect object of the verb",
          "$ref": "#/definitions/roleReference"
        },
        "Object": {
          "description": "The entity which is the direct object of the verb",
          "$ref": "#/definitions/roleReference"
        },
        "PrepositionalPhrases": {
          "description": "Additional prepositional phrases which apply to the phrasing",
          "$ref": "#/definitions/prepPhrases"
        }
      },
      "required": ["Verbs"],
      "additionalProperties": false
    },
    "prepPhrases": {
      "description": "Prepositional phrases used in a phrasing",
      "type": "array",
      "items": {
        "$ref": "#/definitions/prepPhrase"
      },
      "minItems": 1
    },
    "prepPhrase": {
      "description": "A prepositional phrase used in a phrasing",
      "type": "object",
      "properties": {
        "Prepositions": {
          "description": "Prepositions used in the prepositional phrase",
          "$ref": "#/definitions/terms"
        },
        "Object": {
          "description": "The entity which is the object of the prepositional phrase",
          "$ref": "#/definitions/roleReference"
        }
      },
      "required": ["Prepositions", "Object"],
      "additionalProperties": false
    },
    "roleReference": {
      "description": "A reference to a role in a linguistic relationship",
      "oneOf": [
        {
          "$ref": "#/definitions/identifier"
        },
        {
          "$ref": "#/definitions/fullRoleReference"
        }
      ]
    },
    "fullRoleReference": {
      "description": "A reference to a role in a linguistic relationship",
      "type": "object",
      "properties": {
        "Role": {
          "$ref": "#/definitions/identifier"
        }
      },
      "required": ["Role"],
      "additionalProperties": false
    },
    "globalSubstitutions": {
      "description": "Global text substitutions in the linguistic schema.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/globalSubstitution"
      },
      "minItems": 1
    },
    "globalSubstitution": {
      "description": "A global text substitution in the linguistic schema.",
      "type": "object",
      "patternProperties": {
        "^.+$": {
          "$ref": "#/definitions/globalSubstitutionProperties"
        }
      },
      "additionalProperties": false,
      "minProperties": 1,
      "maxProperties": 1
    },
    "globalSubstitutionProperties": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "#/definitions/fullGlobalSubstitutionProperties"
        }
      ]
    },
    "fullGlobalSubstitutionProperties": {
      "type": "object",
      "properties": {
        "Substitute": {
          "description": "The sequence of words to substitute into the utterance.",
          "type": "string"
        },
        "State": {
          "description": "The state of the global substitution",
          "$ref": "#/definitions/state"
        },
        "TemplateSchema": {
          "description": "Identifies the shared template schema from which this global substitution is derived",
          "$ref": "#/definitions/templateSchema"
        }
      },
      "required": ["Substitute"],
      "additionalProperties": false
    },
    "examples": {
      "description": "Examples associated with the linguistic schema",
      "type": "array",
      "items": {
        "$ref": "#/definitions/example"
      },
      "minItems": 1
    },
    "example": {
      "description": "An example utterance associated with the linguistic schema",
      "oneOf": [
        {
          "$ref": "#/definitions/nonEmptyString"
        },
        {
          "$ref": "#/definitions/fullExample"
        }
      ]
    },
    "fullExample": {
      "description": "An example utterance associated with the linguistic schema",
      "type": "object",
      "patternProperties": {
        "^.+$": {
          "$ref": "#/definitions/exampleProperties"
        }
      },
      "additionalProperties": false,
      "minProperties": 1,
      "maxProperties": 1
    },
    "exampleProperties": {
      "description": "Metadata properties about an example utterance",
      "type": "object",
      "properties": {
        "TemplateSchema": {
          "description": "Identifies the shared template schema from which the example is derived",
          "$ref": "#/definitions/templateSchema"
        }
      },
      "additionalProperties": false
    }
  },
  "$id": "https://json.schemastore.org/lsdlschema-2.0.json"
}
