Add result json import validation

This commit is contained in:
Stephan Porada
2020-07-09 15:41:25 +02:00
parent f86f3f4fd5
commit d4eb9e7663
4 changed files with 360 additions and 16 deletions

View File

@ -0,0 +1,322 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/NopaqueCQIPYResults",
"definitions": {
"NopaqueCQIPYResults": {
"type": "object",
"additionalProperties": false,
"properties": {
"matches": {
"type": "array",
"items": {
"$ref": "#/definitions/Match"
}
},
"cpos_lookup": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/CposLookup"
}
},
"text_lookup": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/CorpusAllText"
}
},
"match_count": {
"type": "integer"
},
"corpus_type": {
"type": "string"
},
"query": {
"type": "string"
},
"corpus_name": {
"type": "string"
},
"corpus_description": {
"type": "string"
},
"corpus_creation_date": {
"type": "string",
"format": "date-time"
},
"corpus_last_edited_date": {
"type": "string",
"format": "date-time"
},
"corpus_properties": {
"type": "array",
"items": {}
},
"corpus_size_tokens": {
"type": "integer"
},
"corpus_all_texts": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/CorpusAllText"
}
},
"corpus_analysis_date": {
"type": "string",
"format": "date-time"
},
"corpus_cqi_py_protocol_version": {
"type": "string"
},
"corpus_cqi_py_package_version": {
"type": "string"
},
"corpus_cqpserver_version": {
"type": "string"
},
"cpos_ranges": {
"type": "boolean"
}
},
"required": [
"corpus_all_texts",
"corpus_analysis_date",
"corpus_cqi_py_package_version",
"corpus_cqi_py_protocol_version",
"corpus_cqpserver_version",
"corpus_creation_date",
"corpus_description",
"corpus_last_edited_date",
"corpus_name",
"corpus_properties",
"corpus_size_tokens",
"corpus_type",
"cpos_lookup",
"cpos_ranges",
"match_count",
"matches",
"query",
"text_lookup"
],
"title": "NopaqueCQIPYResults"
},
"CorpusAllText": {
"type": "object",
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"author": {
"type": "string"
},
"booktitle": {
"type": "string"
},
"chapter": {
"type": "string"
},
"editor": {
"type": "string"
},
"institution": {
"type": "string"
},
"journal": {
"type": "string"
},
"pages": {
"type": "string"
},
"publisher": {
"type": "string"
},
"publishing_year": {
"type": "string",
"format": "integer"
},
"school": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"address",
"author",
"booktitle",
"chapter",
"editor",
"institution",
"journal",
"pages",
"publisher",
"publishing_year",
"school",
"title"
],
"title": "CorpusAllText"
},
"CposLookup": {
"type": "object",
"additionalProperties": false,
"properties": {
"word": {
"type": "string"
},
"lemma": {
"type": "string"
},
"simple_pos": {
"$ref": "#/definitions/SimplePos"
},
"pos": {
"type": "string"
},
"ner": {
"$ref": "#/definitions/Ner"
},
"text": {
"type": "integer"
},
"s": {
"type": "integer"
}
},
"required": [
"lemma",
"ner",
"pos",
"s",
"simple_pos",
"text",
"word"
],
"title": "CposLookup"
},
"Match": {
"type": "object",
"additionalProperties": false,
"properties": {
"lc": {
"type": "array",
"items": {
"type": "integer"
}
},
"c": {
"type": "array",
"items": {
"type": "integer"
}
},
"rc": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"required": [
"c",
"lc",
"rc"
],
"title": "Match"
},
"Ner": {
"type": "string",
"enum": [
"NULL",
"LOC",
"MISC",
"ORG",
"PER",
"EVENT",
"GPE",
"LOC",
"ORG",
"PERSON",
"PRODUCT",
"CARDINAL",
"DATE",
"EVENT",
"FAC",
"GPE",
"LANGUAGE",
"LAW",
"LOC",
"MONEY",
"NORP",
"ORDINAL",
"ORG",
"PERCENT",
"PERSON",
"PRODUCT",
"QUANTITY",
"TIME",
"WORK_OF_ART",
"LOC",
"MISC",
"ORG",
"PER",
"LOC",
"MISC",
"ORG",
"PER",
"LOC",
"MISC",
"ORG",
"PER",
"CARDINAL",
"DATE",
"EVENT",
"FAC",
"GPE",
"LANGUAGE",
"LAW",
"LOC",
"MONEY",
"NORP",
"ORDINAL",
"ORG",
"PERCENT",
"PERSON",
"PRODUCT",
"QUANTITY",
"TIME",
"WORK_OF_ART",
"LOC",
"MISC",
"ORG",
"PER"
],
"title": "Ner"
},
"SimplePos": {
"type": "string",
"enum": [
"ADJ",
"ADP",
"ADV",
"AUX",
"CONJ",
"CCONJ",
"DET",
"INTJ",
"NOUN",
"NUM",
"PART",
"PRON",
"PROPN",
"PUNCT",
"SCONJ",
"SYM",
"VERB",
"X",
"SPACE"
],
"title": "SimplePos"
}
}
}