DaletGuard supports civilians affected by armed conflict through Families Beyond War. All sides, no political affiliation. About our humanitarian work

Bank Model Files Explained for Statement Readers

Small JSON documents tell the reader what a known bank statement layout usually looks like. These bank model files hold identifying text, section names and a date format, so the reader starts each run with real hints for 29 bank names across 47 files. A model is trusted only after a run passes its balance check, which keeps weak guesses out of the library, and a statement from any other bank still runs through the same nine phases and the same balance proof.

The wider discipline is covered in the bank statement analysis guide.

Illustration of stamp, browser, document for bank model files
Key takeaway

Bank model files are JSON hints about a known bank layout. A model is saved as validated only after a run passes its balance check, and it never replaces that check.

What a bank model file is and what it holds

Each bank gets one JSON file named for it. A file in the set of bank model files has six blocks.

  • The identity block holds the bank name, a short slug, a version and the validated flag.
  • The discriminants block holds identifying text, balance labels, section names, a date format and a multi-account flag.
  • The structure block describes the summary section, the account format, the transaction sections and the daily balance table.
  • The extraction hints block records separators, the way negatives are printed and rows to skip.
  • The validation rules block holds the balance tolerance of 0.01.
  • The test documents list names the statements that proved the model.

Identifying text lists words that a statement from that bank usually shows, such as a name or a section title. Second, balance labels give the exact wording that the bank uses for opening and closing balances. In addition, some files carry a layout signature, which names the overall page pattern.

How the reader finds and loads a model for each bank

The second phase detects the bank name. Next, it looks for one of the bank model files with the matching slug. If the file exists, the run loads it.

A validated model is logged as validated, and the reader turns it into hints for the next phases. Likewise, an unvalidated model is also loaded, with a warning, and its hints are used too. Therefore, the validated flag tells a reviewer how far the hints were tested.

If no file exists, the same phases still run. The log simply notes that the structure will be learned. Thus, bank model files are an aid and not a requirement.

Specifically, the hints become plain text in the prompts that read the tables. That text names the known structure of the bank, so the model call does not start from zero. However, a model call can still be wrong, which is why the balance check follows later.

DaletParse Checklist: Validated model screen

How a new model is created and then marked as validated

First, the third phase builds a draft model. When the bank name is known, the run builds an initial model from the document structure it saw. That draft holds the summary title, balance labels, sub-account notes and transaction sections. Notably, it starts with the validated flag set to false.

The draft becomes a validated model only after the balance check passes. At that point the run sets the flag and writes the validation date. Finally, it adds the document name to the test documents and saves the file under the bank slug.

This order matters, because a validated model is trusted only after arithmetic proved the reading consistent. A run that fails the balance check never promotes its draft. Likewise, an unvalidated model keeps its warning until a later run balances.

In addition, a switch can turn model saving off for all bank model files. By default, each run that balances can add a file. Teams with strict rules about stored data can use that switch to keep the folder empty.

What the hints tell the reader before it reads tables

The hints describe the known structure of the bank. First, they name the summary section and its balance labels. Also, they say whether each account has its own transaction sections or whether lines are mixed.

When sub-accounts exist, the hints give the separator in the account number. For example, for transaction sections, they can say that all amounts are debits or all are credits. They also name the daily balance section and say whether it has several columns. Identifying text from the model also helps the first phases confirm the bank.

How the hints help to spot a date or a sum

Format hints are small but they save effort. They give the date format, such as month and day. They also give the decimal and thousands separators. A negative is printed in parentheses or with a minus sign.

Meanwhile, continuation pages get a rule as well. If a page starts with data rows and no header, the hints call it a continuation. Thus, it assigns those rows to the same account as the previous page. As a result, a table without a visible account number stays tied to its account.

Illustration for Bank Model Files Explained for Statement Readers

What the 47 extracted files are and what they are not

The repository holds 47 extracted model files. Together they cover 29 bank names. Each one stores identifying text, balance labels, section names, a date format and a multi-account flag. Moreover, most also carry observations from the source statements.

The runtime folder for bank model files is different. Instead, it holds the models that validated runs saved, so its content depends on the runs of each deployment. Both folders are kept out of Git, which means that a fresh clone contains none.

Therefore, say 47 files and not 47 banks. In fact, several files can cover one bank, and 29 names are the real count. Bank model files also do not form a closed list, because a bank outside them still runs without a model.

The bank statement extraction page describes the product route in which these files are used.

How to manage model files as part of your deployment

Treat the folder of bank model files as configuration. Thus, back it up, and copy it when you move a deployment, because a fresh checkout will not carry it. Also, record which bank model files were present when you ran a pack, so that results can be repeated.

Next, check the validated flag and the validation date before you trust a validated model. A model is saved per bank name, so a redesigned statement layout may need a new validated run. Meanwhile, the run falls back on its normal phases when a model does not fit.

The National Institute of Standards and Technology (opens in new tab) publishes guidance on configuration management. The format itself is described at JSON.org (opens in new tab). That helps staff who read a model by hand.

What a model never replaces in the rest of the checks

Bank model files help the reader begin well. They do not prove that the reading was right. However, the balance check still tests each account, as the article on the running balance check explains.

Bank model files also do not settle which account owns a line. The article on multi-account statements shows how that review works. Similarly, the article on bank statement table detection shows where the tables themselves can fail.

Treat each model as a hint and keep the balance check

Bank model files give the reader a better start. A validated model is saved only after a run balances, and no model replaces the balance check. Keep the bank model files with your deployment, and say 47 files, not 47 banks.

Let a reviewer decide what the arithmetic cannot.

A diagram of 3 connected steps, each with a small drawing: Validated model, Identifying text, Balance.

Questions and answers on this topic from the product team

What are bank model files in DaletParse?

They are JSON files with hints about the layout of a known bank statement. A file holds identifying text, balance labels, section names, a date format and structure notes. The reader uses them to find its way around a layout, and a run without a model still works.

When does a validated model get saved?

A model is saved as validated only after the balance check passes for the run. The run sets the validated flag, writes the validation date and adds the document name to the test documents. A run that fails the check does not promote its draft.

Do 47 model files mean 47 banks?

The repository holds 47 extracted files that cover 29 bank names, so several files can describe one bank. Say 47 files and not 47 banks when you describe coverage. A bank outside the files still runs, because the same phases work without a model.

What happens when no model exists for a bank?

The same phases run, and the log notes that the structure will be learned. The third phase builds a draft model from what it sees, with the validated flag set to false. The draft becomes validated only after the balance check passes.

Can a model replace the balance check?

A model only helps the reader start well on a known layout. The balance check still tests opening plus credits minus debits for each account. A reviewer should treat a model as a hint and read the balance status as before.

See how DaletParse fits the providers your team uses today

Book a short meeting for a walkthrough with your own providers in mind, or join an in-person class to learn the method first.