GithubHelp home page GithubHelp logo

Comments (18)

kosloot avatar kosloot commented on May 23, 2024

Ok, this can be in fact rather complicated. Have to look into that.
It is a libfolia bug most certainly.
(thanx for beta testing)

from ucto.

kosloot avatar kosloot commented on May 23, 2024

can you provide me with the offensive file?

from ucto.

JessedeDoes avatar JessedeDoes commented on May 23, 2024

from ucto.

kosloot avatar kosloot commented on May 23, 2024

No attachment found. Please provide me with the file.
Preferably using the GitHub issue tracker interface.

from ucto.

JessedeDoes avatar JessedeDoes commented on May 23, 2024

Apparently the attachment did not come through

HuygensING-vandam-1-1_db216f75-63d8-4e28-9994-4d141ef58410.xml.gz

from ucto.

kosloot avatar kosloot commented on May 23, 2024

Hmm.
I just realized that this error message is not generated by ucto and/or libfolia
ucto nor libfolia seem to find anything problematic with this file.
So it is up to @proycon to fix pynlpl or such

from ucto.

proycon avatar proycon commented on May 23, 2024

Investigating....

from ucto.

proycon avatar proycon commented on May 23, 2024

First unrelated but important observation: The document states it is FoLiA v0.8 but is in fact FoLiA v1.5 (new metadata structures are used). Who set the version attribute on the root FoLiA element? (generator does say libfolia v1.10)

from ucto.

proycon avatar proycon commented on May 23, 2024

(Bug moved to proycon/pynlpl#34)

from ucto.

proycon avatar proycon commented on May 23, 2024

After fixing the error in folia, an issue popped up that does seem an ucto (or libfolia) issue, so I'm reopening this:

We have a paragraph with text, the text consists of several parts in italic, each part is put on a separate line in the FoLiA (although of not much practical value here and an artefact of the conversion, it is allowed and valid FoLiA). The lines are separated by newlines and space indentation. This newline+indentation should either be carried over as-is to the sub-element (sentence), or translated as a single space (i.e. normalized form, which text validation uses). Serialisation by the python library seems okay here. But in ucto we see that things got concatenated Indiën,en but more strikingly toegedragenen.

Offending FoLiA XML snippet:

            <p xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1" class="p">
              <t class="default">
                <t-style class="italic">Verhandelinge van het ecclesiasticq of JcercJcelijcke saecken en regieringh in Indiën,</t-style>
                <t-style class="italic">en hoedanigh deselve haar van den beginne en soo vervolgens hebben toegedragen</t-style>
                <t-style class="italic">en dat alles is gereguleert; voort aennemen van predikanten , sieckentroosters en</t-style>
                <t-style class="italic">schoolmeesters voor de kercken aldaar, met derselver respective tractemenien, en</t-style>
                <t-style class="italic">specialij eken mede raeckende het opreghten van een seminarium voor jonge studenten,</t-style>
                <t-style class="italic">hoe dat is begrepen en wat daarin is gedaan. Soo oock hoedanigh het is gelegen</t-style>
                <t-style class="italic">met de Franschen aan de Caep de Goede Hoop en wat ordre omtrent het ecclesias-</t-style>
                <t-style class="italic">ticq en den godsdienst ten aansien van deselve daar is ge-stelt.</t-style>
              </t>
              <lang class="nld" set="http://raw.github.com/proycon/folia/master/setdefinitions/iso639_3.foliaset"/>
              <s xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1">
                <t class="default">Verhandelinge van het ecclesiasticq of JcercJcelijcke saecken en regieringh in Indiën,en hoedanigh deselve haar van den beginne en soo vervolgens hebben toegedragenen dat alles is gereguleert; voort aennemen van predikanten , sieckentroosters enschoolmeesters voor de kercken aldaar, met derselver respective tractemenien, enspecialij eken mede raeckende het opreghten van een seminarium voor jonge studenten,hoe dat is begrepen en wat daarin is gedaan.</t>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.1" class="WORD" set="tokconfig-nld">
                  <t class="default">Verhandelinge</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.2" class="WORD" set="tokconfig-nld">
                  <t class="default">van</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.3" class="WORD" set="tokconfig-nld">
                  <t class="default">het</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.4" class="WORD" set="tokconfig-nld">
                  <t class="default">ecclesiasticq</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.5" class="WORD" set="tokconfig-nld">
                  <t class="default">of</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.6" class="WORD" set="tokconfig-nld">
                  <t class="default">JcercJcelijcke</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.7" class="WORD" set="tokconfig-nld">
                  <t class="default">saecken</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.8" class="WORD" set="tokconfig-nld">
                  <t class="default">en</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.9" class="WORD" set="tokconfig-nld">
                  <t class="default">regieringh</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.10" class="WORD" set="tokconfig-nld">
                  <t class="default">in</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.11" class="WORD" set="tokconfig-nld" space="no">
                  <t class="default">Indiën</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.12" class="PUNCTUATION" set="tokconfig-nld" space="no">
                  <t class="default">,</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.13" class="WORD" set="tokconfig-nld">
                  <t class="default">en</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.14" class="WORD" set="tokconfig-nld">
                  <t class="default">hoedanigh</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.15" class="WORD" set="tokconfig-nld">
                  <t class="default">deselve</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.16" class="WORD" set="tokconfig-nld">
                  <t class="default">haar</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.17" class="WORD" set="tokconfig-nld">
                  <t class="default">van</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.18" class="WORD" set="tokconfig-nld">
                  <t class="default">den</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.19" class="WORD" set="tokconfig-nld">
                  <t class="default">beginne</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.20" class="WORD" set="tokconfig-nld">
                  <t class="default">en</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.21" class="WORD" set="tokconfig-nld">
                  <t class="default">soo</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.22" class="WORD" set="tokconfig-nld">
                  <t class="default">vervolgens</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.23" class="WORD" set="tokconfig-nld">
                  <t class="default">hebben</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.24" class="WORD" set="tokconfig-nld">
                  <t class="default">toegedragenen</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.25" class="WORD" set="tokconfig-nld">
                  <t class="default">dat</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.26" class="WORD" set="tokconfig-nld">
                  <t class="default">alles</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.27" class="WORD" set="tokconfig-nld">
                  <t class="default">is</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.28" class="WORD" set="tokconfig-nld" space="no">
                  <t class="default">gereguleert</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.29" class="PUNCTUATION" set="tokconfig-nld">
                  <t class="default">;</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.30" class="WORD" set="tokconfig-nld">
                  <t class="default">voort</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.31" class="WORD" set="tokconfig-nld">
                  <t class="default">aennemen</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.32" class="WORD" set="tokconfig-nld">
                  <t class="default">van</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.33" class="WORD" set="tokconfig-nld">
                  <t class="default">predikanten</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.34" class="PUNCTUATION" set="tokconfig-nld">
                  <t class="default">,</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.35" class="WORD" set="tokconfig-nld">
                  <t class="default">sieckentroosters</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.36" class="WORD" set="tokconfig-nld">
                  <t class="default">enschoolmeesters</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.37" class="WORD" set="tokconfig-nld">
                  <t class="default">voor</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.38" class="WORD" set="tokconfig-nld">
                  <t class="default">de</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.39" class="WORD" set="tokconfig-nld">
                  <t class="default">kercken</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.40" class="WORD" set="tokconfig-nld" space="no">
                  <t class="default">aldaar</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.41" class="PUNCTUATION" set="tokconfig-nld">
                  <t class="default">,</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.42" class="WORD" set="tokconfig-nld">
                  <t class="default">met</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.43" class="WORD" set="tokconfig-nld">
                  <t class="default">derselver</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.44" class="WORD" set="tokconfig-nld">
                  <t class="default">respective</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.45" class="WORD" set="tokconfig-nld" space="no">
                  <t class="default">tractemenien</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.46" class="PUNCTUATION" set="tokconfig-nld">
                  <t class="default">,</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.47" class="WORD" set="tokconfig-nld">
                  <t class="default">enspecialij</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.48" class="WORD" set="tokconfig-nld">
                  <t class="default">eken</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.49" class="WORD" set="tokconfig-nld">
                  <t class="default">mede</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.50" class="WORD" set="tokconfig-nld">
                  <t class="default">raeckende</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.51" class="WORD" set="tokconfig-nld">
                  <t class="default">het</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.52" class="WORD" set="tokconfig-nld">
                  <t class="default">opreghten</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.53" class="WORD" set="tokconfig-nld">
                  <t class="default">van</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.54" class="WORD" set="tokconfig-nld">
                  <t class="default">een</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.55" class="WORD" set="tokconfig-nld">
                  <t class="default">seminarium</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.56" class="WORD" set="tokconfig-nld">
                  <t class="default">voor</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.57" class="WORD" set="tokconfig-nld">
                  <t class="default">jonge</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.58" class="WORD" set="tokconfig-nld" space="no">
                  <t class="default">studenten</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.59" class="PUNCTUATION" set="tokconfig-nld" space="no">
                  <t class="default">,</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.60" class="WORD" set="tokconfig-nld">
                  <t class="default">hoe</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.61" class="WORD" set="tokconfig-nld">
                  <t class="default">dat</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.62" class="WORD" set="tokconfig-nld">
                  <t class="default">is</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.63" class="WORD" set="tokconfig-nld">
                  <t class="default">begrepen</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.64" class="WORD" set="tokconfig-nld">
                  <t class="default">en</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.65" class="WORD" set="tokconfig-nld">
                  <t class="default">wat</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.66" class="WORD" set="tokconfig-nld">
                  <t class="default">daarin</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.67" class="WORD" set="tokconfig-nld">
                  <t class="default">is</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.68" class="WORD" set="tokconfig-nld" space="no">
                  <t class="default">gedaan</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.1.w.69" class="PUNCTUATION" set="tokconfig-nld">
                  <t class="default">.</t>
                </w>
              </s>
              <s xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2">
                <t class="default">Soo oock hoedanigh het is gelegenmet de Franschen aan de Caep de Goede Hoop en wat ordre omtrent het ecclesias-ticq en den godsdienst ten aansien van deselve daar is ge-stelt.</t>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.1" class="WORD" set="tokconfig-nld">
                  <t class="default">Soo</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.2" class="WORD" set="tokconfig-nld">
                  <t class="default">oock</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.3" class="WORD" set="tokconfig-nld">
                  <t class="default">hoedanigh</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.4" class="WORD" set="tokconfig-nld">
                  <t class="default">het</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.5" class="WORD" set="tokconfig-nld">
                  <t class="default">is</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.6" class="WORD" set="tokconfig-nld">
                  <t class="default">gelegenmet</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.7" class="WORD" set="tokconfig-nld">
                  <t class="default">de</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.8" class="WORD" set="tokconfig-nld">
                  <t class="default">Franschen</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.9" class="WORD" set="tokconfig-nld">
                  <t class="default">aan</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.10" class="WORD" set="tokconfig-nld">
                  <t class="default">de</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.11" class="WORD" set="tokconfig-nld">
                  <t class="default">Caep</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.12" class="WORD" set="tokconfig-nld">
                  <t class="default">de</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.13" class="WORD" set="tokconfig-nld">
                  <t class="default">Goede</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.14" class="WORD" set="tokconfig-nld">
                  <t class="default">Hoop</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.15" class="WORD" set="tokconfig-nld">
                  <t class="default">en</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.16" class="WORD" set="tokconfig-nld">
                  <t class="default">wat</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.17" class="WORD" set="tokconfig-nld">
                  <t class="default">ordre</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.18" class="WORD" set="tokconfig-nld">
                  <t class="default">omtrent</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.19" class="WORD" set="tokconfig-nld">
                  <t class="default">het</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.20" class="WORD-COMPOUND" set="tokconfig-nld">
                  <t class="default">ecclesias-ticq</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.21" class="WORD" set="tokconfig-nld">
                  <t class="default">en</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.22" class="WORD" set="tokconfig-nld">
                  <t class="default">den</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.23" class="WORD" set="tokconfig-nld">
                  <t class="default">godsdienst</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.24" class="WORD" set="tokconfig-nld">
                  <t class="default">ten</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.25" class="WORD" set="tokconfig-nld">
                  <t class="default">aansien</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.26" class="WORD" set="tokconfig-nld">
                  <t class="default">van</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.27" class="WORD" set="tokconfig-nld">
                  <t class="default">deselve</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.28" class="WORD" set="tokconfig-nld">
                  <t class="default">daar</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.29" class="WORD" set="tokconfig-nld">
                  <t class="default">is</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.30" class="WORD-COMPOUND" set="tokconfig-nld" space="no">
                  <t class="default">ge-stelt</t>
                </w>
                <w xml:id="TEI.1.text.1.body.1.div1.1.div2.1.argument.1.p.1.s.2.w.31" class="PUNCTUATION" set="tokconfig-nld">
                  <t class="default">.</t>
                </w>
              </s>
            </p>

from ucto.

proycon avatar proycon commented on May 23, 2024

We had some internal discussion regarding this second interesting problem that arose and it concerns something quite fundamental and is now documented in issue proycon/folia#34 .

from ucto.

JessedeDoes avatar JessedeDoes commented on May 23, 2024

Another example: (after update last night)
voorbeelden_validatieprobleem.zip

File "/home/does/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.1-py3.4.egg/pynlpl/formats/folia.py", line 2587, in parsexml
raise ParseError("FoLiA exception in handling of <" + subnode.tag[len(NSFOLIA)+2:] + "> @ line " + str(subnode.sourceline) + ": [" + e.class.name + "] " + str(e), cause=e) #Python 3 will preserve full original traceback, Python 2 does not, original cause is explicitly passed to ParseError anyway
pynlpl.formats.folia.ParseError: FoLiA exception in handling of

@ line 120: [InconsistentText] Text for Part, ID None, class default, is inconsistent: expected (after normalization): '', got (after normalization): 'Die aventure doet ons cont Dattie coninc nu ter stont Hilt enen groten hof Om te meerre sinen lof. Drie M ridders, over waer, Waren nu ten etene daer Ende IIIc ridders tallen stonden Waren daer vander Tavelronden, Die altoes waren met Arture. Nu seget ons die aventure Dattie coninc Waleweine beval Sijn lant te achterwaerne al Ende al dat hi dade dat ware gedaen. Dit beneet Keyen saen, Dat Walewein aldus scone staet, Dat hi was des conincs raet Ende dlant algader an hem stoet Ende men dor hem also nine doet, Want hi drossate was al daer. Dor dese dinc al oppenbaer Pijndi hem hoe hi mochte Walewein verraden. Hord wat hi dochte: Hi ginc saen al daer hi vant Ende vergaderde XX ridders thant, Die van sinen gesellen waren Ende seide hoet daer ware gevaren Dat Walewein al ware here. Ende: "Wildi mi nu ter ere Hulpen. Ic saels verdinen wel." Dese XX ridders waren fel Ende haetten Walewein om die dinc Dat hem dicke so wel verginc. Ende: "Her drossate, uwen raet Wille wi doen, hoe soet gaet, Ende secgen dat gi wilt ende lien." Doe ginc Keye met deser partien Vorden coninc Arture staen Ende seide: "Here, nu hevet gedaen Walewein, u neve, grote overmodecheit. Hi hevet sulke dinc geseit Dies si hen alle mogen scamen Die inden hove sijn te samen." "Keye", sprac Artur, die coninc, "Wat meindi met deser dinc? Wat heeft Walewein, min neve, geseit?" "Her coninc, ic segt u wel gereit, Want al dese ridders horden dat, Dat hi hem gisteren margen vermat, Wildi varen om aventuren, Datter hem soude meer geburen Binnen enen jare, op dat hi woude, Dant algader den ridders soude Die sinen hove behoren toe." Des was die coninc harde onvroe Ende sloech thoeft ter eerder neder. Over een stic hief hijt op weder Ende sprac: "Keye, es dit waer?" "Here, vrages den ridderen daer Oft sijt iet horden dat hijt seide." Doe vragdes die coninc. Sonder beide Seiden sijt allegader daer,'

from ucto.

proycon avatar proycon commented on May 23, 2024

Investigating..... Expected "" is very odd and may be indicative of a new bug in the python library...

from ucto.

kosloot avatar kosloot commented on May 23, 2024

from ucto.

proycon avatar proycon commented on May 23, 2024

Indeed, the document already fails validation prior to ucto

from ucto.

proycon avatar proycon commented on May 23, 2024

Okay, I found the issue here. It is not a library problem (nor ucto problem), it is in fact a genuine FoLiA error caught by the text validation, but it is a pretty easy to miss case. In fact, libfolia currently misses it as well whilst the python library catches it correctly.

Consider line 138, it says: <t>....</t><br/>, the dangling <br/> outside <t> is what causes the problem. Move it inside <t> in this case and all should be fine.

Explanation:

This may be a bit hard to spot and understand at first, but here we go:
<t> is the text content for the structure element in which it is contained. <br/> doubles as either a structure element (outside <t>) or a text markup element (inside <t>). FoLiA supports text redundancy (text specified at multiple levels) and the new text validation checks whether text at multiple levels is indeed consistent. By moving <br/> out of <t> you are effectively saying: I am specifying a deeper structural level here, just as if you were to add a <w> at that point. Which is all fine, but it has to be textually consistent with what is specified for the parent element as a whole. In this case the deeper structural layer contains only <br/> (the text of which is a \n and which is normalised away in text validation), and this mismatches with the contents of <t>.

I hope this makes a bit of sense :)

from ucto.

JessedeDoes avatar JessedeDoes commented on May 23, 2024

yes!!:
lamachine)[does@vm10757 tei2folia]$ foliavalidator /vol2/Nederlab/Corpus/6-FoLiA/walekey/HuygensING-waleweinendekeye-1-1_db4093d6-079c-4787-b27b-188f55751c6a.xml
Validated successfully: /vol2/Nederlab/Corpus/6-FoLiA/walekey/HuygensING-waleweinendekeye-1-1_db4093d6-079c-4787-b27b-188f55751c6a.xml

In the <br> 's were inside <t>originally. I moved them out because it caused problems in the previous version :)

from ucto.

kosloot avatar kosloot commented on May 23, 2024

closing this. Most is resolved, plus the discussion is messy because it touched several packages :)

from ucto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.