b5a9d8e3c23b73f0050cff9f426260bd709d0a75,robotreviewer/textprocessing/pdfreader.py,PdfReader,parse_xml,#PdfReader#Any#,119

Before Change


                    output.grobid["title"] = self._extract_text(elem)
                elif elem.tag in ["{http://www.tei-c.org/ns/1.0}head", "{http://www.tei-c.org/ns/1.0}p"]:
                    full_text_bits.extend([self._extract_text(elem), "\n"])
                elif elem.tag=="{http://www.tei-c.org/ns/1.0}author" and "{http://www.tei-c.org/ns/1.0}fileDesc" in path:
                    author_list.append(re.sub("\s+"," ", self._extract_text(elem)))
                    
                path.pop()

After Change


                elif elem.tag in ["{http://www.tei-c.org/ns/1.0}head", "{http://www.tei-c.org/ns/1.0}p"]:
                    full_text_bits.extend([self._extract_text(elem), "\n"])
                elif elem.tag=="{http://www.tei-c.org/ns/1.0}persName" and "{http://www.tei-c.org/ns/1.0}fileDesc" in path:
                    forenames = [e.text for e in elem.findall("{http://www.tei-c.org/ns/1.0}forename")]
                    lastnames = [e.text for e in elem.findall("{http://www.tei-c.org/ns/1.0}surname")]
                    initials = [f[0] for f in forenames]
                    // NB the format below is identical to that used in pubmed_robot.py
                    author_list.append({"initials": u"".join(initials),
                                        "forename": u" ".join(forenames),
                                        "lastname": u" ".join(lastnames)})
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: ijmarshall/robotreviewer
Commit Name: b5a9d8e3c23b73f0050cff9f426260bd709d0a75
Time: 2016-08-18
Author: mail@ijmarshall.com
File Name: robotreviewer/textprocessing/pdfreader.py
Class Name: PdfReader
Method Name: parse_xml


Project Name: ijmarshall/robotreviewer
Commit Name: 46c648c38a32af8431c76699e36000848b574d95
Time: 2016-08-18
Author: mail@ijmarshall.com
File Name: robotreviewer/textprocessing/pdfreader.py
Class Name: PdfReader
Method Name: parse_xml


Project Name: open-mmlab/mmdetection
Commit Name: 2d2e5c6f42b6f4b8ab4f68985b1fd7823e3be505
Time: 2021-01-13
Author: 35596075+congee524@users.noreply.github.com
File Name: docs/stat.py
Class Name:
Method Name: