0

In Document AI's bank statement processor the output json gives info about the fields detected. Since it's bank statement it's possible to have two accounts in same statement. The AI is able to detect the accounts and their respective beginning and ending balances but it's in a linear fashion where one account data is followed by other not sure whether the balance of one account will be after the other.

eg: the output entities are like

"beginning_balance": 2344 USD
"ending_balance": 7578 USD
"account_type": "type2"
"beginning_balance": 3455 USD
"ending_balance": 4578 USD

not sure which balance belongs to which account until I visually take a look at the document.

Is there a way the output can be parsed in a structured manner or just I need to use my own logic to map balance which comes first to first account type

1 Answers1

1

Would you be able to provide a sample document that contains multiple account statements?

The Bank Statement Parser is intended to handle a single statement with each request.

If it's possible to split by pages, then you can use the Lending Splitter & Classifier to identify page split points and process them separately.

If both statements are on the same page, then you would need to create post-processing logic to map each statement to the particular account. You can also look into creating a Custom Document Extractor to handle this specific format of document.

Holt Skinner
  • 1,692
  • 1
  • 8
  • 21
  • It's bank statement so confidential is there any other medium via which I can share you the statement privately like your mail_id – Poojesshwaran V Apr 12 '23 at 07:45
  • If it's confidential, you probably shouldn't send it to me anyway. Can you post a redacted version? – Holt Skinner Apr 12 '23 at 18:01
  • sample document link https://drive.google.com/file/d/1-LsUrTBC1t2VZVPgf1PcFBx40YzkcwVz/view?usp=sharing – Poojesshwaran V Apr 13 '23 at 21:16
  • Ok, thanks for sharing that. It looks like your best option will be to split the document into two files (one for checking and one for savings) and process them separately. It looks like the lending splitter/classifier doesn't identify the statements as separate documents in my test, so this would need to be done with a custom splitter or through other means. – Holt Skinner Apr 14 '23 at 14:54
  • Looking at the document object output, all of the entities have page numbers listed. And processor version `pretrained-bankstatement-v1.1-2021-08-13` successfully identifies account types. So you can use the page numbers and the identified account types to determine which transactions correspond to which account. I will also check with the product development team to see if there's anything in the works for this pretrained processor to support multiple accounts in one statement – Holt Skinner Apr 14 '23 at 14:55
  • the problem with account type is it occurs at multiple places, so given bank statement's having this common problem of having transactions of one account but on top having account number of other account is hard to map in this condition, and this is something which we can't ignore coz it's a major problem to be solved – Poojesshwaran V Apr 21 '23 at 19:31