sparrow-parse 0.2.8__py3-none-any.whl → 0.2.9__py3-none-any.whl
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.
- sparrow_parse/__init__.py +1 -1
- sparrow_parse/extractor/html_extractor.py +23 -23
- sparrow_parse/extractor/unstructured_processor.py +0 -8
- {sparrow_parse-0.2.8.dist-info → sparrow_parse-0.2.9.dist-info}/METADATA +1 -1
- {sparrow_parse-0.2.8.dist-info → sparrow_parse-0.2.9.dist-info}/RECORD +7 -7
- {sparrow_parse-0.2.8.dist-info → sparrow_parse-0.2.9.dist-info}/WHEEL +0 -0
- {sparrow_parse-0.2.8.dist-info → sparrow_parse-0.2.9.dist-info}/entry_points.txt +0 -0
sparrow_parse/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '0.2.
|
1
|
+
__version__ = '0.2.9'
|
@@ -224,29 +224,29 @@ if __name__ == "__main__":
|
|
224
224
|
# to run for debugging, navigate to sparrow_parse and run the following command:
|
225
225
|
# python -m extractor.html_extractor
|
226
226
|
|
227
|
-
with open('data/invoice_1_table.txt', 'r') as file:
|
228
|
-
|
229
|
-
|
230
|
-
file_content = file_content.strip()[1:-1].strip()
|
231
|
-
data_list = re.split(r"',\s*'", file_content)
|
232
|
-
data_list = [item.strip(" '") for item in data_list]
|
227
|
+
# with open('data/invoice_1_table.txt', 'r') as file:
|
228
|
+
# file_content = file.read()
|
229
|
+
#
|
230
|
+
# file_content = file_content.strip()[1:-1].strip()
|
231
|
+
# data_list = re.split(r"',\s*'", file_content)
|
232
|
+
# data_list = [item.strip(" '") for item in data_list]
|
233
233
|
|
234
234
|
extractor = HTMLExtractor()
|
235
235
|
|
236
|
-
answer, targets_unprocessed = extractor.read_data(
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
print(answer)
|
252
|
-
print(targets_unprocessed)
|
236
|
+
# answer, targets_unprocessed = extractor.read_data(
|
237
|
+
# # ['description', 'qty', 'net_price', 'net_worth', 'vat', 'gross_worth'],
|
238
|
+
# ['transaction_date', 'value_date', 'description', 'cheque', 'withdrawal', 'deposit', 'balance',
|
239
|
+
# 'deposits', 'account_number', 'od_limit', 'currency_balance', 'sgd_balance', 'maturity_date'],
|
240
|
+
# data_list,
|
241
|
+
# 0.5,
|
242
|
+
# 0.3,
|
243
|
+
# # None,
|
244
|
+
# ['deposits', 'account_number', 'od_limit', 'currency_balance', 'sgd_balance', 'transaction_date',
|
245
|
+
# 'value_date', 'description', 'cheque', 'withdrawal', 'deposit', 'balance', 'maturity_date'],
|
246
|
+
# True,
|
247
|
+
# True,
|
248
|
+
# True,
|
249
|
+
# True)
|
250
|
+
#
|
251
|
+
# print(answer)
|
252
|
+
# print(targets_unprocessed)
|
@@ -177,11 +177,3 @@ if __name__ == "__main__":
|
|
177
177
|
# True,
|
178
178
|
# True)
|
179
179
|
|
180
|
-
content, table_content = processor.extract_data(
|
181
|
-
'/Users/andrejb/Documents/work/epik/bankstatement/OCBC_1_1.pdf',
|
182
|
-
'hi_res',
|
183
|
-
'yolox',
|
184
|
-
['tables', 'unstructured'],
|
185
|
-
True,
|
186
|
-
True)
|
187
|
-
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sparrow-parse
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.9
|
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,13 +1,13 @@
|
|
1
|
-
sparrow_parse/__init__.py,sha256=
|
1
|
+
sparrow_parse/__init__.py,sha256=e5Klz6yLU-4Ub9zxGUBo9wADAYsST38ZylTv9ze4i60,21
|
2
2
|
sparrow_parse/__main__.py,sha256=Xs1bpJV0n08KWOoQE34FBYn6EBXZA9HIYJKrE4ZdG78,153
|
3
3
|
sparrow_parse/data/invoice_1_table.txt,sha256=dsWEASxlVNidpTCQDowCM7SjaUzSqwx7DuydTfaQ7xI,1115
|
4
4
|
sparrow_parse/extractor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
sparrow_parse/extractor/extractor_helper.py,sha256=n9M9NyZfesiCCj3ET9WoyqRcWIFJ4k-jyQlUAarKIhE,13658
|
6
|
-
sparrow_parse/extractor/html_extractor.py,sha256=
|
6
|
+
sparrow_parse/extractor/html_extractor.py,sha256=rwtumbPrJoJ8UryjlrASAjAGSsu6bbu-TQm_6ouJods,9915
|
7
7
|
sparrow_parse/extractor/markdown_processor.py,sha256=dC2WUdA-v2psh7oytruftxYkXdQi72FoEYxF30ROuO0,4506
|
8
|
-
sparrow_parse/extractor/unstructured_processor.py,sha256=
|
8
|
+
sparrow_parse/extractor/unstructured_processor.py,sha256=z46aXacMvfW_wmsACs0LtamoMc19eogGd5fVVAj4vIo,6771
|
9
9
|
sparrow_parse/temp.py,sha256=Hl1wPOEytXnfbUobU8BJgEswPsfncibbQdwrpSHtlOo,513
|
10
|
-
sparrow_parse-0.2.
|
11
|
-
sparrow_parse-0.2.
|
12
|
-
sparrow_parse-0.2.
|
13
|
-
sparrow_parse-0.2.
|
10
|
+
sparrow_parse-0.2.9.dist-info/METADATA,sha256=qgLxJOpKE9X_uutQhasniDYf6kX93p5exRUTZCAYts4,5622
|
11
|
+
sparrow_parse-0.2.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
12
|
+
sparrow_parse-0.2.9.dist-info/entry_points.txt,sha256=H507qotwq3VX4lv5pY9MZYtupKNE1RRb8gEQucPiGi0,52
|
13
|
+
sparrow_parse-0.2.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|