File size: 1,315 Bytes
d4558b2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://huggingface.co/datasets/egobowwow/universal-annotations/resolve/v1.0.0/schemas/universal-annotation-adapter.schema.json",
"title": "Declarative Universal Annotation adapter",
"type": "object",
"additionalProperties": false,
"required": ["schema_version", "adapter_id", "target_schema_id", "rules"],
"properties": {
"schema_version": {"const": "1.0.0"},
"adapter_id": {"type": "string", "minLength": 1},
"target_schema_id": {"type": "string", "minLength": 1},
"rules": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["target_field", "predicate_id", "subject_kind", "subject_id", "object_representation", "cardinality", "required"],
"properties": {
"target_field": {"type": "string", "minLength": 1},
"predicate_id": {"type": "string", "minLength": 1},
"subject_kind": {"type": ["string", "null"]},
"subject_id": {"type": ["string", "null"]},
"object_representation": {"enum": ["node_id", "node_concept", "concept", "value"]},
"cardinality": {"enum": ["one", "many"]},
"required": {"type": "boolean"}
}
}
}
}
}
|