proycon / foliatools

A number of command-line tools for working with FoLiA (Format for Linguistic Annotation). Includes validators, converters, visualisers, and more.
GNU General Public License v3.0
10 stars 4 forks source link

Is foliavalidator right in rejecting this ? #8

Closed kosloot closed 4 years ago

kosloot commented 4 years ago

given this FoLiA file: question.xml.txt

I wonder if this isn't 'acceptable' FoLiA. folialint accepts it, but foliavalidator says:

foliavalidator question.xml
VALIDATION ERROR on full parse by library (stage 2/3), in question.xml
ParseError: FoLiA exception in handling of <s> @ line 38 (in parent <p> @ parent line 36) : [DeclarationError] Processor ucto.1 is used for annotationtype SENTENCE, set None, but has no corresponding <annotator> referring to it from the annotations declaration block!

This message is very confusing at least. as there IS in fact a sentence-annotation block with annotator ucto.1.

There is an "empty" sentence-annotation too, which is not needed and confusing. But still. I think it is valid FoLiA, and if not, the message is dead wrong.

kosloot commented 4 years ago

OK, I now see what is wrong with this file! the second sentence states processor="ucto.1", but is DOESN'T mention the correct set. adding set="passthru" to the sentence fixes this. (or removing it from the sentence-annotation declaration.)

So foliavalidator is right, and it just boils down to ME not grasping the error message.