Skip to content

Commit

Permalink
fix structured data annotator tab parsing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanathan committed Apr 11, 2019
1 parent 6942b2b commit 5e11753
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions epitator/structured_data_annotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def word_token_regex(disallowed_delimiter):
table_parser ^= (
(pypar.LineStart() + pypar.Optional(pypar.White())).suppress() +
row * (1, None)).setResultsName("delimiter:" + separator)
table_parser.parseWithTabs()

key_value_separators = [":", "-", ">"]
key_value_list_parser = pypar.NoMatch()
Expand All @@ -47,6 +48,7 @@ def word_token_regex(disallowed_delimiter):
key_value_list_parser ^= (
(pypar.LineStart() + pypar.Optional(pypar.White())).suppress() +
row * (2, None)).setResultsName("delimiter:" + separator)
key_value_list_parser.parseWithTabs()


class StructuredDataAnnotator(Annotator):
Expand Down

0 comments on commit 5e11753

Please sign in to comment.