Skip to content

Can I disable text validation? #26

@stelmath

Description

@stelmath

Hello and thanks for the repo,

I think I have an issue with text validation. I have created a folia Doc with sentence elements and their text. I am machine translating it and then reading the machine translated xml as a new folia Document. No issue so far, then I am creating a new folia Document that has div elements and inside it I am appending sentence pairs, one from each of those two folia Documents (the original one and the one that I machine translated). But, when I try to append this sentence from the machine translated Document I get:

folia.main.InconsistentText: Text for <Sentence at 140523773674208 id=source_segment_EN_7 set=None class=None>, is inconsistent: EXPECTED (deep text after normalization) *****>
[ date ]
****> BUT FOUND (strict text after normalization) ****>
[date]
******* DEVIATION POINT: [<*HERE*>date]
(also checked against older rules prior to FoLiA v2.4.1)

Basically my sentence is :

<s xml:id="source_segment_EN_7">
      <t>
        <t-style class="bold">[date]</t-style>
      </t>
</s>

which results in the above error. I don't understand what the term deep text and strict text means but can I simply turn off this validation and let this sentence be appended in a div? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions