Skip to content

Commit 48eef2d

Browse files
Hiromu Hotalukehsiao
authored andcommitted
Update CHANGELOG and comments
1 parent 8ec5a85 commit 48eef2d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ Changed
2323
* Removed ``pdf_path``. Now this is required only by :class:`PdfVisualLinker`.
2424
* Removed ``visual``. Provide ``visual_parser`` if visual information is to be parsed.
2525

26+
Fixed
27+
^^^^^
28+
* `@HiromuHota`_: Process the tail text only after child elements.
29+
(`#333 <https://github.com/HazyResearch/fonduer/issues/333>`_)
30+
(`#520 <https://github.com/HazyResearch/fonduer/pull/520>`_)
31+
2632
0.8.3_ - 2020-09-11
2733
-------------------
2834

src/fonduer/parser/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ def _parse_paragraph(
599599
else:
600600
fields = ["text"]
601601
node.set("visited", "text")
602-
self.stack.append(node) # will be visited again later for tail
602+
self.stack.append(node) # will visit again later for tail
603603
for field in fields:
604604
text = getattr(node, field)
605605
text = text.strip() if text and self.strip else text
@@ -753,7 +753,7 @@ def _parse_node(
753753
:return: a *generator* of Sentences
754754
"""
755755
# Processing on entry of node
756-
if node.get("visited") != "text":
756+
if node.get("visited") != "text": # skip when .text has been parsed
757757
state = self._parse_section(node, state)
758758

759759
state = self._parse_figure(node, state)

0 commit comments

Comments
 (0)