Comments (4)
Isn't the last statement always a neat warning/error already? It should be
from folia.
Well, your mileage me vary of course, but I think this is messy (especially the cascade op exceptions):
VALIDATION ERROR on full parse by library (stage 2/2), in zonderPart.mini.xml
ParseError: FoLiA exception in handling of <list> @ line 79: [InconsistentText] Text for ListItem, ID TEI.1.text.1.body.1.div1.1.p.3.list.1.item.1, class default, is inconsistent: expected (after normalization): '1.', got (after normalization): 'La reformation de l'instruction du Conseil, qui peut cependant agir selon qu'il est instruict.'
-- Full traceback follows -->
Traceback (most recent call last):
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 2586, in parsexml
e = doc.parsexml(subnode, Class)
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 7273, in parsexml
return Class.parsexml(node,self)
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 2664, in parsexml
instance = Class(doc, *args, **kwargs)
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 3158, in __init__
super(AbstractStructureElement,self).__init__(doc, *args, **kwargs)
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 686, in __init__
self.append(child)
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 3169, in append
e = super(AbstractStructureElement,self).append(child, *args, **kwargs)
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 1590, in append
if dopostappend: child.postappend()
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 3177, in postappend
self.doc.textvalidationerrors += int(not self.textvalidation())
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 858, in textvalidation
raise InconsistentText(msg)
pynlpl.formats.folia.InconsistentText: Text for ListItem, ID TEI.1.text.1.body.1.div1.1.p.3.list.1.item.1, class default, is inconsistent: expected (after normalization): '1.', got (after normalization): 'La reformation de l'instruction du Conseil, qui peut cependant agir selon qu'il est instruict.'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/FoLiA_tools-1.5.1.59-py3.4.egg/foliatools/foliavalidator.py", line 55, in validate
document = folia.Document(file=filename, deepvalidation=deep,textvalidation=True,verbose=True, debug=debug)
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 6398, in __init__
self.load(self.filename)
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 6435, in load
self.parsexml(self.tree.getroot())
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 7265, in parsexml
e = self.parsexml(subnode)
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 7273, in parsexml
return Class.parsexml(node,self)
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 2586, in parsexml
e = doc.parsexml(subnode, Class)
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 7273, in parsexml
return Class.parsexml(node,self)
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 2586, in parsexml
e = doc.parsexml(subnode, Class)
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 7273, in parsexml
return Class.parsexml(node,self)
File "/home/does/lamachine/lamachine/lib/python3.4/site-packages/PyNLPl-1.2.5-py3.4.egg/pynlpl/formats/folia.py", line 2591, 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)
pynlpl.formats.folia.ParseError: FoLiA exception in handling of <list> @ line 79: [InconsistentText] Text for ListItem, ID TEI.1.text.1.body.1.div1.1.p.3.list.1.item.1, class default, is inconsistent: expected (after normalization): '1.', got (after normalization): 'La reformation de l'instruction du Conseil, qui peut cependant agir selon qu'il est instruict.'
from folia.
Ok, there might be some room for improvement, perhaps I should make full tracebacks optional.
from folia.
Finally implemented in new validator for FoLiA v2
from folia.
Related Issues (20)
- Random results from foliavalidator and folia2txt HOT 19
- New problems with leading/trailing whitespace around linebreaks in text content HOT 1
- FoLiA to W3C Web Annotations conversion HOT 1
- What is the license of the FoLiA data format? HOT 4
- Is this valid FoLiA? HOT 3
- comprehensive linguistic annotation HOT 16
- Python issues: Splitting long text by folia2txt and FLAT in the custom software HOT 1
- Offset problems with "empty" TextMarkup elements
- Document and extend the "external" mechanism
- Problems with leading/trailing whitespace in text content HOT 32
- Allow features in markup annotation
- Predefine some subsets for style annotation
- allow for multiple foreign metadata nodes in FoLiA, even in 'native' mode
- Regression: Text consistency breakage since FoLiA v2.4.1 HOT 6
- Tagging mechanism to aid processors HOT 1
- Add a t-lang element HOT 1
- some questions regarding the new <t-hspace> tag HOT 7
- May a processor be assigned to a <text> element? HOT 5
- correcting a correction. What is wrong here? HOT 1
- extracting text from corrections. What are the semantics? HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from folia.