proycon / foliapy

An extensive Python library for dealing with FoLiA (Format for Linguistic Annotation) documents, a rich XML-based format for linguistic annotation finding application in Natural Language Processing (NLP). This library was formerly part of PyNLPl.
https://proycon.github.io/folia
GNU General Public License v3.0
18 stars 5 forks source link

can't read folia xml doc #17

Closed Midi77 closed 4 years ago

Midi77 commented 4 years ago

When trying to read in this Folia xml doc I get the error: "Exception: FoLiA Document has no version!" I'm using python 3.7.

proycon commented 4 years ago

Hmm, some very old FoLIA documents might perhaps not explicitly indicate their version, perhaps the library needs to make a guess then instead of giving an error. If you can edit the input document, then the quickest way to circumvent this for now is probably to add a version attribute to your FoLiA (root) element, and give it an old value of for example "0.8":


<FoLiA version="0.8">
proycon commented 4 years ago

This issue should be solved now in foliapy 2.2.5 which I just released