UUDigitalHumanitieslab/corpus2alpino

Compatibility with FoLiA files containing a spelling correction

oktaal opened this issue · 0 comments

FoLiA files containing a spelling correction result in the following error when the document is loaded:

pynlpl.formats.folia.ParseError: FoLiA exception in handling of @ line 4081: [ValueError] Set is required for Correction. Class 'spelling' assigned without set.

For example this file: BNOsp9-ds.folia.zip

This specific error can be caused by:

https://github.com/proycon/pynlpl/blob/40bf42757f3211215bc3dfdefa8072f6e8bd7281/pynlpl/formats/folia.py#L305-L311

It seems this could be resolved by setting autodeclare to True.