mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-27 02:16:32 +03:00
37c7c85a86
* Support nowrap setting in util.prints * Tidy up and fix whitespace * Simplify script and use read_jsonl helper * Add JSON schemas (see #2928) * Deprecate Doc.print_tree Will be replaced with Doc.to_json, which will produce a unified format * Add Doc.to_json() method (see #2928) Converts Doc objects to JSON using the same unified format as the training data. Method also supports serializing selected custom attributes in the doc._. space. * Remove outdated test * Add write_json and write_jsonl helpers * WIP: Update spacy train * Tidy up spacy train * WIP: Use wasabi for formatting * Add GoldParse helpers for JSON format * WIP: add debug-data command * Fix typo * Add missing import * Update wasabi pin * Add missing import * 💫 Refactor CLI (#2943) To be merged into #2932. ## Description - [x] refactor CLI To use [`wasabi`](https://github.com/ines/wasabi) - [x] use [`black`](https://github.com/ambv/black) for auto-formatting - [x] add `flake8` config - [x] move all messy UD-related scripts to `cli.ud` - [x] make converters function that take the opened file and return the converted data (instead of having them handle the IO) ### Types of change enhancement ## Checklist <!--- Before you submit the PR, go over this checklist and make sure you can tick off all the boxes. [] -> [x] --> - [x] I have submitted the spaCy Contributor Agreement. - [x] I ran the tests, and all new and existing tests passed. - [x] My changes don't require a change to the documentation, or if they do, I've added all required information. * Update wasabi pin * Delete old test * Update errors * Fix typo * Tidy up and format remaining code * Fix formatting * Improve formatting of messages * Auto-format remaining code * Add tok2vec stuff to spacy.train * Fix typo * Update wasabi pin * Fix path checks for when train() is called as function * Reformat and tidy up pretrain script * Update argument annotations * Raise error if model language doesn't match lang * Document new train command
129 lines
2.7 KiB
JSON
129 lines
2.7 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-06/schema",
|
|
"type": "object",
|
|
"properties": {
|
|
"lang": {
|
|
"title": "Two-letter language code, e.g. 'en'",
|
|
"type": "string",
|
|
"minLength": 2,
|
|
"maxLength": 2,
|
|
"pattern": "^[a-z]*$"
|
|
},
|
|
"name": {
|
|
"title": "Model name",
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"pattern": "^[a-z_]*$"
|
|
},
|
|
"version": {
|
|
"title": "Model version",
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"pattern": "^[0-9a-z.-]*$"
|
|
},
|
|
"spacy_version": {
|
|
"title": "Compatible spaCy version identifier",
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"pattern": "^[0-9a-z.-><=]*$"
|
|
},
|
|
"parent_package": {
|
|
"title": "Name of parent spaCy package, e.g. spacy or spacy-nightly",
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"default": "spacy"
|
|
},
|
|
"pipeline": {
|
|
"title": "Names of pipeline components",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"description": {
|
|
"title": "Model description",
|
|
"type": "string"
|
|
},
|
|
"license": {
|
|
"title": "Model license",
|
|
"type": "string"
|
|
},
|
|
"author": {
|
|
"title": "Model author name",
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"title": "Model author email",
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"url": {
|
|
"title": "Model author URL",
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"sources": {
|
|
"title": "Training data sources",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"vectors": {
|
|
"title": "Included word vectors",
|
|
"type": "object",
|
|
"properties": {
|
|
"keys": {
|
|
"title": "Number of unique keys",
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"vectors": {
|
|
"title": "Number of unique vectors",
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"width": {
|
|
"title": "Number of dimensions",
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
}
|
|
},
|
|
"accuracy": {
|
|
"title": "Accuracy numbers",
|
|
"type": "object",
|
|
"patternProperties": {
|
|
"*": {
|
|
"type": "number",
|
|
"minimum": 0.0
|
|
}
|
|
}
|
|
},
|
|
"speed": {
|
|
"title": "Speed evaluation numbers",
|
|
"type": "object",
|
|
"patternProperties": {
|
|
"*": {
|
|
"oneOf": [
|
|
{
|
|
"type": "number",
|
|
"minimum": 0.0
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"lang",
|
|
"name",
|
|
"version"
|
|
]
|
|
}
|