Skip to content

spaCy convert on a directory instead of a file? #9349

Discussion options

You must be logged in to vote

Thank you for your question! spacy convert can convert a directory of corpus files, as long as they have the same type. For example:

$ ls conllu_dir
nl_lassysmall-ud-dev.conllu
nl_lassysmall-ud-test.conllu
nl_lassysmall-ud-train.conllu
$ mkdir output_dir
$ spacy convert conllu_dir output_dir
ℹ Grouping every 1 sentences into a document.
⚠ To generate better training data, you may want to group sentences
into documents with `-n 10`.
✔ Generated output file (676 documents):
output_dir/nl_lassysmall-ud-dev.spacy
ℹ Grouping every 1 sentences into a document.
⚠ To generate better training data, you may want to group sentences
into documents with `-n 10`.
✔ Generated output file (876 documents)…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by svlandeg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage General spaCy usage feat / cli Feature: Command-line interface
2 participants
Converted from issue

This discussion was converted from issue #9347 on October 01, 2021 12:43.