InvoiceNet
InvoiceNet copied to clipboard
Training with JSON array object in json file: Not Working
JSON given for Training:
{
"total_amount": "850,456.00",
"amount": ["2,000.00","1,000.00","1,000.00","2,000.00","1,000.00","2,000.00"]
}
Note: Image taken from Google Images
I want to include multiple values for the same feature.. like the above-given example of "amount". Error:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\Anshul\Anaconda3\envs\CO\lib\tkinter\__init__.py", line 1705, in __call__
return self.func(*args)
File "C:\Users\Anshul\InvoiceNet\invoicenet\gui\trainer.py", line 363, in _prepare_data
fields[field] = util.normalize(labels[field], key="amount")
File "C:\Users\Anshul\InvoiceNet\invoicenet\common\util.py", line 199, in normalize
text = text.replace(",", '')
AttributeError: 'list' object has no attribute 'replace'
The current model architecture cannot handle multiple entities for a single field. The label for each field is expected to be a single string.
This is definitely a limitation but we are working on addressing the problem of multiple entity extraction for InvoiceNet 2.0. Thank you for pointing this out!