Skip to content
Advertisement

Problem to covert data from CoNLL format to spacy format

How can I covert data from CoNLL format to spacy format?

I’ve executed current code following similar Q&A on stackoverflow: How to convert from CoNLL format to spacy format.

CoNLL

JavaScript

spacyformat

JavaScript

However, I cannot fix the error.

Code

JavaScript

Error Message

I’ve read the document, spacy convert, but have no idea how to fix the error.

JavaScript

Environment

Python 3.9.1

spaCy version 3.1.1

Advertisement

Answer

Well your first problem is exactly what the error says, there is no -o option. The output is just the argument after the input. (I see that in my other answer I put an -o, but that was a mistake.)

Your second problems is that conll and conllu format are not the same thing. The two-column format you have is referred to as conll (or just ner) in spaCy.

If you fix those issues the conversion should just work.

I am not sure what your spacyFormat line is referring to.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement