Contract Data Extraction From Scanned Agreements
By Schema LawPublished Updated
Contract data extraction means pulling specific terms out of an agreement, such as the parties, dates, amounts and notice periods, and recording them as fields in a table or database. On a scanned agreement it takes two steps: OCR turns the page images into text, then a person or a program picks the terms out of that text.
Those two steps fail in different ways, and most disappointment with extraction comes from treating them as one. The sections below cover what to extract, how to do it from a scan, how to keep control across a data room, and how to check each value against the signed page.
Defined clauses are easy to skip when you only grab dates and dollars. Search the converted agreement for indemnification, warranty, consideration, and condition precedent language, and check the signature pages you would set aside when the file mentions the statute of frauds. A breach of contract draft quotes those sections. Read every date, amount, and party name on the scan before you save the row.
What is contract data extraction?
Contract data extraction is the work of reading an agreement and writing down a fixed set of facts about it in a structured form: one row per contract, one column per term. The contract stays a document. The extraction is an index to it that you can sort, filter and count.
Lawyers did this by hand long before the phrase existed. A lease abstract, a contract summary, a diligence chart and a key-dates calendar are all extractions. The word arrived when software began to do part of the reading. What comes out is the same kind of thing either way, and so is the duty to check it.
It helps to separate three kinds of fact, because they carry different risk:
| Kind of fact | Example | Who can supply it |
|---|---|---|
| A value printed on the page | Effective date, party name, purchase price | A careful reader or a program, then a check |
| Whether a clause exists and where | An assignment clause at section 14.2 | A reader or a search, then a check |
| What the clause means for the client | Whether a sale of the company needs the counterparty's consent | A lawyer |
The first two are data. The third is legal analysis that happens to fit in a spreadsheet cell. A chart that mixes them without saying which is which invites someone to treat an opinion as a fact copied from the page. Keep a separate column for the quoted language and another for the conclusion drawn from it.
Which contract terms are worth extracting?
Extract the terms that someone will sort, count or act on, and leave the rest in the document. For most matters that means the parties, the key dates, the money, and a short list of clauses tied to the question the client actually asked.
Start from that question. Counsel for a buyer wants to know which contracts can be terminated or need consent on a change of control. A company cleaning up its vendor files wants renewal dates and notice windows. A litigator wants the forum clause and the limitation of liability. The field list follows from the purpose, and a list borrowed from another deal usually has the wrong columns.
| Field | Where it usually sits | Common trap |
|---|---|---|
| Parties | Preamble and signature block | The preamble names one entity and the signature block another |
| Effective date | Preamble or a definition | Differs from the date beside each signature |
| Term and renewal | Term clause | Automatic renewal hidden in a later sentence |
| Notice deadline | Term, termination or notices clause | Counted in business days in one place and calendar days in another |
| Amounts | Payment clause, schedules | The figure in words disagrees with the figure in numerals |
| Governing law and forum | Near the end | Law and forum point to different places |
| Assignment and change of control | Assignment clause, sometimes definitions | "Assignment" defined to include a change of control |
| Liability cap | Limitation of liability clause | Cap tied to fees paid, which needs a second lookup |
| Amendments | Separate documents | The amendment replaces a term you already recorded |
Every column has a price. Twenty fields across three hundred contracts is six thousand cells, and each one has to be found, typed and checked. Cut any field nobody can name a use for. You can always go back for it, because the converted text will still be there.
How do you extract terms from a scanned agreement?
To extract terms from a scanned agreement, convert the scan to text first, then find each term in the text with the page image open beside it. Record the value, the clause number and the page, so anyone can trace a cell back to its source in a few seconds.
A procedure that holds up on one contract or on fifty:
- Fix the field list before you open a contract. Write a one-line definition for each field. "Renewal date" should say whether it means the date the term ends or the last day to give notice.
- Check whether the file already has text. Try to select a word. If you cannot, the file is a picture of the pages, as the post on why you can't copy text from a PDF explains.
- Run OCR on the whole agreement. Include exhibits, schedules and every amendment. Terms that change the answer often live at the back.
- Pick an export that suits how you will read. Word or plain text for reading and searching. Excel when the terms sit in a pricing schedule. JSON when a script will do the searching.
- Search for anchor words. "Commence", "renew", "written notice", "governed by", "assign" and "shall not exceed" find most of the clauses on a standard field list.
- Record value, clause and page together. A value without a location cannot be checked later without rereading the contract.
- Say why a cell is empty. "Silent" (the contract has no such term), "not found" (you did not locate it) and "illegible" are three different answers.
- Verify against the signed page before the row is marked complete.
A worked example. A fictional supply agreement between Northgate Mills LLC and Perrin Packaging, Inc. runs fourteen scanned pages. The finished row reads:
| Field | Value | Clause | Page |
|---|---|---|---|
| Effective date | 2 January 2023 | Preamble | 1 |
| Initial term | 36 months | 3.1 | 2 |
| Renewal | Automatic, 12-month periods | 3.2 | 2 |
| Non-renewal notice | 90 days before the term ends | 3.2 | 3 |
| Governing law | Ohio | 17.4 | 12 |
| Assignment | Consent required, not to be unreasonably withheld | 15.1 | 11 |
In Schema Law you upload the PDF, PNG or JPEG, up to 20 MB, and it reads the pages into text and tables that you can view and export. Be clear about what the export holds. The JSON file lists each page with its number, its text, any tables as a header and rows, and the page as Markdown. It has no field called "effective date". Finding that date in the text is your step, done by hand or with your own script. The post on scanned PDF to JSON walks through the file's structure.
OCR versus extraction: two different steps
OCR and extraction are separate steps with separate jobs. OCR answers "which characters are on this page?" Extraction answers "which of those characters are the renewal date?" A tool can do one, the other or both, and a wrong value can come from either.
| OCR | Extraction | |
|---|---|---|
| Input | Page images | Text |
| Output | Text and tables | Named fields with values |
| Typical error | $1,250,000 read as $1,280,000 | The amendment's date recorded as the effective date |
| How you catch it | Compare the text with the image | Read the clause and ask whether this is the right term |
| What fixes it | A better scan or a better recognition tool | A clearer field definition or a more careful reader |
The distinction matters most when something is wrong. If a liability cap in your chart does not match the contract, look at the converted text first. When the text is wrong, the scan or the recognition is the problem, and every value taken from that page is suspect. When the text is right, the mistake was made in choosing or typing the value, and the other pages are probably fine.
A product that advertises contract extraction may run both steps behind one button. That can save time, but it also hides which step failed. Ask such a vendor whether you can see the recognized text for a page, and whether each extracted value links to the place it came from.
Schema Law does the first step. It gives you text and tables to extract terms from. It does not hand you a list of extracted terms, and it does not decide which date is the effective date. The export formats on the homepage show what you can download. If you are weighing a model-based tool for the second step, the post on AI OCR for lawyers covers the failure modes to test for.
Extraction across a due diligence data room
Across a data room, the hard part is control. You need to know that every agreement was converted, that every row traces to one file, and that "termination date" meant the same thing to the reviewer on day one as on day ten. Speed comes second to that.
Take an inventory before converting anything. List each file with its data room index number and page count, and note which files already have selectable text. Only the scans need OCR.
Group contracts into families. A master agreement, its three amendments and a dozen statements of work are one relationship. Decide whether a row describes each document or the agreement as amended, and add a column naming the amendment that supplied a changed term.
Run a pilot. Extract ten contracts with the draft field list, then compare notes. The first ten always expose a field that is defined loosely or a clause type nobody planned for. Changing the list after ten contracts is cheap. After two hundred it means reopening every file.
Extract from executed copies only. Data rooms hold drafts, unsigned forms and duplicates. Record whether the signature pages are present, and flag any contract where they are missing instead of quietly extracting from the draft.
Carry the index number through. Put it at the front of each file name before upload so every export inherits it. The post on batch OCR for discovery documents covers naming and splitting large sets in more detail.
Plan the page volume. In Schema Law the Solo plan covers 1,000 pages a month with documents of up to 250 pages, and the Team plan covers 10,000 pages a month with documents of up to 1,000 pages. On either plan you can choose several files at once, and they are read one after another. The pricing page has the full list. A room of 400 contracts averaging 18 pages is 7,200 pages, which settles the plan question before the work starts.
Check the confidentiality terms. A data room usually sits under a non-disclosure agreement that limits who may receive the documents. Read it before sending files to any outside service. The post on uploading client documents to an OCR tool lists the questions to ask a vendor.
Checking extracted terms against the signed page
Read every extracted value against the image of the signed page before anyone relies on it. The converted text is a working copy. The executed agreement is the contract, and where the two differ the chart is wrong, however the difference arose.
Check in order of consequence:
- Numbers. Amounts, percentages, day counts and section references. A single wrong digit reads as plausibly as the right one.
- Dates. Especially where the month and day could be swapped, or where a "1" and a "7" look alike in the scan.
- Names. Entity suffixes matter. "Holdings LLC" and "Holdings Inc." may be two companies.
- Negatives. A dropped "not" reverses a clause. Read the whole sentence, not the highlighted phrase.
Then look for what conversion tends to miss. Handwritten changes are the main one: a struck-through figure with a new one written above it and initialed in the margin. Recognition may return the printed figure, the handwritten one, both or neither, and only the image tells you which governs. The same goes for blanks filled in by pen, such as a date or a notice address. The post on OCR and handwritten notes explains why handwriting is the weak point.
Decide how much checking each field needs. A value that will appear in a disclosure schedule or a closing condition deserves a second reader on every row. A field used only to sort the chart can be sampled: check one row in ten, and check them all if the sample turns up errors.
Record the check. Add "verified by" and "date" columns, and never fill them in bulk. When a partner asks six weeks later whether the renewal date on row 212 is right, the answer should be a name, a date and a page number. The general method for comparing converted text with a scan is in the post on why OCR output is full of errors, and lease-specific problems are covered in commercial lease PDF to Word.