b82f2e7e4fdd155128a44bfbe270ea6d64704edf,kraken/lib/xml.py,,parse_page,#Any#,31

Before Change


        doc = etree.parse(fp)
        image = doc.find(".//{*}Page")
        if image is None or image.get("imageFilename") is None:
            raise KrakenInputException("No valid filename found in PageXML file")
        lines = doc.findall(".//{*}TextLine")
        data = {"image": os.path.join(base_dir, image.get("imageFilename")), "lines": []}
        for line in lines:
            pol = line.find("./{*}Coords")

After Change


            raise KrakenInputException("Parsing {} failed: {}".format(filename, e))
        image = doc.find(".//{*}Page")
        if image is None or image.get("imageFilename") is None:
            raise KrakenInputException("No valid image filename found in PageXML file {}".format(filename))
        lines = doc.findall(".//{*}TextLine")
        data = {"image": os.path.join(base_dir, image.get("imageFilename")), "lines": []}
        for line in lines:
            pol = line.find("./{*}Coords")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: mittagessen/kraken
Commit Name: b82f2e7e4fdd155128a44bfbe270ea6d64704edf
Time: 2019-10-30
Author: mittagessen@l.unchti.me
File Name: kraken/lib/xml.py
Class Name:
Method Name: parse_page


Project Name: mittagessen/kraken
Commit Name: 0afb1658a8926e0cdd3f1853f709a796b3fa10f9
Time: 2018-03-11
Author: mittagessen@l.unchti.me
File Name: kraken/pageseg.py
Class Name:
Method Name: segment


Project Name: mittagessen/kraken
Commit Name: 53221333f626d0dd3f1bd7a5b05fea284adac0c4
Time: 2018-03-10
Author: mittagessen@l.unchti.me
File Name: kraken/pageseg.py
Class Name:
Method Name: segment