0

我正在尝试从头开始为自定义 NLP 管道创建一个新的 Spacy 3.0 项目。似乎没有办法做到这一点。我可以在文档中找到的唯一机制是克隆现有项目存储库,然后对其进行编辑。有没有其他方法可以做到这一点?

 >>> python -m spacy project --help
 Usage: python -m spacy project [OPTIONS] COMMAND [ARGS]...

  Command-line interface for spaCy projects and templates. You'd typically
  start by cloning a project template to a local directory and fetching its
  assets like datasets etc. See the project's project.yml for the available
  commands.

Options:
  --help  Show this message and exit.

Commands:
  assets    Fetch project assets like datasets and pretrained weights.
  clone     Clone a project template from a repository.
  document  Auto-generate a README.md for a project.
  dvc       Auto-generate Data Version Control (DVC) config.
  pull      Retrieve available precomputed outputs from a remote storage.
  push      Persist outputs to a remote storage.
  run       Run a named command or workflow defined in the project.yml. 
4

1 回答 1

0

您所需要的只是一个包含project.yml. 一个最小的命令project.yml

commands:
  - name: "demo"
    script:
      - "python --version"

几乎所有东西都是可选的。不需要资产:

spacy project assets
⚠ No assets specified in project.yml

运行一个定义的命令:

spacy project run demo
==================================== demo ====================================
Running command: /home/username/venv/spacy/bin/python --version
Python 3.7.3

见:https ://spacy.io/usage/projects#project-yml

于 2021-02-26T11:07:47.827 回答