sparrow-parse 0.2.8__tar.gz → 0.2.9__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.8
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,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "sparrow-parse"
3
- version = "0.2.8"
3
+ version = "0.2.9"
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.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
- 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]
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
- # ['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)
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 +0,0 @@
1
- __version__ = '0.2.8'
File without changes