2019-08-29 13:04:01 +03:00
|
|
|
## Examples of NER/IOB data that can be converted with `spacy convert`
|
|
|
|
|
2021-03-10 13:42:02 +03:00
|
|
|
To convert an IOB file to `.spacy` ([`DocBin`](https://spacy.io/api/docbin))
|
|
|
|
for spaCy v3:
|
2019-08-29 13:04:01 +03:00
|
|
|
|
2021-03-10 13:42:02 +03:00
|
|
|
```bash
|
|
|
|
python -m spacy convert -c iob -s -n 10 -b en_core_web_sm file.iob .
|
2019-08-29 13:04:01 +03:00
|
|
|
```
|
2021-03-10 13:42:02 +03:00
|
|
|
|
|
|
|
See all the `spacy convert` options: https://spacy.io/api/cli#convert
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
The spaCy v2 JSON training files were generated using **spaCy v2** with:
|
|
|
|
|
|
|
|
```bash
|
2019-08-29 13:04:01 +03:00
|
|
|
python -m spacy convert -c iob -s -n 10 -b en file.iob
|
|
|
|
```
|
2021-03-10 13:42:02 +03:00
|
|
|
|
|
|
|
To convert an existing JSON training file to `.spacy` for spaCy v3, convert
|
|
|
|
with **spaCy v3**:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
python -m spacy convert file.json .
|
|
|
|
```
|