实际上,我使用CLI创建了模型(NER)(速度更快),但是我需要为每个模型自定义名称。我该怎么做?
python -m spacy train ru SPB_data train.json test_new.json -n 99 -p ner
python -m spacy package SPB_data/model-final out
cd out/SPB_data-1.0.0
python setup.py sdist
答案 0 :(得分:0)
对于meta.json
,可以在输出目录中的model-final
文件中更改模型的名称。在内部,这将happen接下来:
model_name = meta["lang"] + "_" + meta["name"]
model_name_v = model_name + "-" + meta["version"]
main_path = output_path / model_name_v
package_path = main_path / model_name