Created
June 12, 2019 21:18
-
-
Save sam-writer/2e549af40fb7a269f67783f0f9a14d2f to your computer and use it in GitHub Desktop.
Spacy Match and Replace Schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Schema for validation Qordoba Spacy Match/Replace format", | |
"type": "object", | |
"definitions": { | |
"spacyMatch": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/spacyAttribute" | |
}, | |
"minItems": 1 | |
}, | |
"spacyAttribute": { | |
"type": "object", | |
"properties": { | |
"ORTH": { | |
"$ref": "#/definitions/spacyValue" | |
}, | |
"TEXT": { | |
"$ref": "#/definitions/spacyValue" | |
}, | |
"LOWER": { | |
"$ref": "#/definitions/spacyValue" | |
}, | |
"LENGTH": { | |
"$ref": "#/definitions/spacyValue" | |
}, | |
"POS": { | |
"$ref": "#/definitions/spacyValue" | |
}, | |
"TAG": { | |
"$ref": "#/definitions/spacyValue" | |
}, | |
"DEP": { | |
"$ref": "#/definitions/spacyValue" | |
}, | |
"SHAPE": { | |
"$ref": "#/definitions/spacyValue" | |
}, | |
"ENT_TYPE": { | |
"$ref": "#/definitions/spacyValue" | |
}, | |
"OP": { | |
"enum": [ | |
"!", | |
"?", | |
"*", | |
"+" | |
] | |
} | |
}, | |
"patternProperties": { | |
"^IS_[A-Z]*$": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"spacyOperator": { | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"REGEX": { | |
"type": "string" | |
}, | |
"IN": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"NOT_IN": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"==": { | |
"type": "number" | |
}, | |
">=": { | |
"type": "number" | |
}, | |
">": { | |
"type": "number" | |
}, | |
"<=": { | |
"type": "number" | |
}, | |
"<": { | |
"type": "number" | |
} | |
} | |
}, | |
"spacyValue": { | |
"oneOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "integer" | |
}, | |
{ | |
"$ref": "#/definitions/spacyOperator" | |
} | |
] | |
} | |
}, | |
"patternProperties": { | |
"^[a-z_][A-Za-z0-9_]*$": { | |
"type": "object", | |
"properties": { | |
"patterns": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/spacyMatch" | |
}, | |
"minItems": 1 | |
} | |
}, | |
"required": [ | |
"patterns", | |
"suggestions" | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For VS Code integration with a given service located at
path/to/service/
... if it doesn't already exist, createpath/to/service/.vscode/settings.json
. In that file, add: