sparrow-parse 0.2.0__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sparrow-parse
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Sparrow Parse is a Python package for parsing and extracting information from documents.
5
5
  Home-page: https://github.com/katanaml/sparrow/tree/main/sparrow-data/parse
6
6
  License: GPL-3.0
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "sparrow-parse"
3
- version = "0.2.0"
3
+ version = "0.2.2"
4
4
  description = "Sparrow Parse is a Python package for parsing and extracting information from documents."
5
5
  authors = ["Andrej Baranovskij <andrejus.baranovskis@gmail.com>"]
6
6
  license = "GPL-3.0"
@@ -0,0 +1 @@
1
+ __version__ = '0.2.2'
@@ -3,8 +3,8 @@ from sentence_transformers import SentenceTransformer, util
3
3
  from bs4 import BeautifulSoup
4
4
  import json
5
5
  from rich.progress import Progress, SpinnerColumn, TextColumn
6
- from extractor_helper import merge_html_table_headers
7
- from extractor_helper import clean_html_table_header_names
6
+ from .extractor_helper import merge_html_table_headers
7
+ from .extractor_helper import clean_html_table_header_names
8
8
  import re
9
9
 
10
10
 
@@ -221,7 +221,10 @@ class HTMLExtractor(object):
221
221
 
222
222
 
223
223
  if __name__ == "__main__":
224
- # with open('../data/invoice_1_table.txt', 'r') as file:
224
+ # to run for debugging, navigate to sparrow_parse and run the following command:
225
+ # python -m extractor.html_extractor
226
+
227
+ # with open('data/invoice_1_table.txt', 'r') as file:
225
228
  # file_content = file.read()
226
229
  #
227
230
  # file_content = file_content.strip()[1:-1].strip()
@@ -98,7 +98,7 @@ class UnstructuredProcessor(object):
98
98
  if options is None:
99
99
  content = self.process_json_file(file_path)
100
100
 
101
- if options and "tables" in options and "html" in options:
101
+ if options and "tables" in options and "unstructured" in options:
102
102
  content = self.process_json_file(file_path, "form")
103
103
 
104
104
  table_content = self.process_json_file(file_path, "table")
@@ -1 +0,0 @@
1
- __version__ = '0.2.0'
File without changes