zkrhm
zkrhm

Reputation: 39

spacy convert conllul to spacy json format

I get data from Universal Dependencies I work mostly with Indonesian (bahasa) so I clone the repo:

both repo contains bz2 file and after unpack I get the contained files. everything there is in conllul format. so I tried to convert it to spacy's json format using command :

python -m spacy convert thefile.conllul .

however, spacy throwing error message :

Unknown format Can't find converter for conllul

how to do the conversion? is conllul and conll format is the same thing? if not, how do I convert conllul to conll format? thx in advance

Upvotes: 3

Views: 1739

Answers (1)

gdaras
gdaras

Reputation: 10119

Ok, let's clarify things a bit, before answering your question.

The following statements are true:

  • There are different ConNLL formats
  • The different formats have in common that they derive from CoNLL conference.
  • Spacy provides a converter via its CLI for 2 different formats: the simple conll format and the most recent conllu format. You can find more about the conll format here and more about conllu format here
  • Conllul is a different data format, presented in 2018. You can read more here
  • Spacy does not support directly conversion between conllul and json format.

Having all that in mind, the answer to your question I guess it would be to use a conllu format for your language, which is a standard way to work with natural language data with spacy. I have found that there is data in the format in the ud treebank collection for your language. You can download the data from here and then use spacy converter to convert them to json.

I really hope it helped. :)

Upvotes: 4

Related Questions