Extract a table from a public report
- Case study 2
- 120 min
- Optional · 1 case study needed for the certificate
Case study 2 of 2 · Document and Multimodal AIExtract a table from a public report
1. Understand document inputs
2. Prepare and extract content
3. Recover structure and tables
4. Use multimodal models deliberately
5. Validate and review results
6. Evaluate and deliver the pipeline
7. Case studies
What you will be able to do
Copy a statistics table that runs over two pages of a real government report into clean records. Every cell keeps its value, its unit, its page and its box. Then prove the copy right, cell by cell, against the agency’s own data files, and run it again on next month’s report.
This case study is a notebook. The work is to read one table, score it and explain the result, and a notebook shows each step with its output. It downloads the two reports from the agency (or the same bytes from the Nextia labs repository) and installs pdfplumber. It runs in about 30 seconds. It needs no account and no key: the vision model’s answers are recorded.
Before you startWhat to know and to have ready
What you need to know
This case study uses the whole course. These lessons matter most:
- Header rows, merged cells, units in the header and tables over two pages, from Tables and spreadsheets.
- Boxes in points and the evidence of every value, from Provenance representation.
- Footnote marks and page furniture, from Sections and hierarchy.
- Checks that a total adds up, from Business validation.
- Scores with missing and invented values, from Field-level metrics.
What you need on your computer (only for the local route; the notebook needs none of it)
- A virtual environment with pdfplumber 0.11.10. The
doc-extractproject’s environment has it; this case study does not change the project. - The notebook, downloaded from the link above, in VS Code or JupyterLab. Its setup cell makes a new folder
public-report-table. To start again, delete that folder.
Tested on macOS (Apple silicon) with Python 3.12.13 and pdfplumber 0.11.10, in Jupyter from a fresh start. Windows and Linux are not tested.
The situation
Section titled “The situation”Ruth Adeyemi plans storage space and trucks for a grain cooperative. Every month the US Department of Agriculture publishes Crop Production, its forecast of the harvest. Ruth’s team copies one table from it into the board’s planning sheet: the area, the yield and the production of every crop. The table runs over two pages, and the team types about 370 numbers by hand.
Last spring a number went into the wrong column. The board planned with it for a month before anyone saw it. Ruth asks her analyst, Kofi Mensah:
“Can a program copy the table? I want two things. The board must see where each number is printed in the report. And I want proof that the copy is right, not a promise.”
Kofi has an answer sheet for the proof. The agency also publishes the same table as CSV files, in a zip next to the PDF. So every cell that a program reads from the PDF can be checked against the agency’s own file.
Sam, a new member of Kofi’s team, asks the obvious question: “If the CSV exists, why read the PDF at all?” Kofi gives three reasons. The PDF is the published record, and the board quotes its pages. The CSV has no page and no box. And most reports Ruth reads have no CSV: a reader that is proven on this table can be used on those. The CSV is what makes this report a fair test.
What you will build
Section titled “What you will build”You will build a table reader for one table that runs over two pages. It finds the table by its title, reads both pages and joins them into 41 rows and 9 columns. Each cell keeps its printed text, its unit, its page and its box. Then you score it cell by cell against the agency’s CSV, next to four other ways to read the same pages. You add two checks that need no CSV. Last, you run everything on next month’s report without changing a line.
The skills come from the whole course. You use table recovery, evidence boxes, the vision path from Text and OCR paths, business checks and field-level scores.
Text description of the diagram
The report PDF has 47 pages. The reader finds the table’s pages by its title: pages 25 and 26. It reads each page, with the columns from the printed rules and the rows from the text lines. It recovers the header names, the units, the groups, the parts and the footnote marks. Then it joins the two pages by the row’s label, into 41 rows and 9 columns. Every cell of the result has a value, a unit, a page and a box. The table is then compared cell by cell with the agency’s CSV files. It is also checked by its own logic: the parts add up, and area times yield gives production. Each cell ends as a match, a wrong value, a missing value or an extra value.
The data
Section titled “The data”The report is Crop Production from the USDA National Agricultural Statistics Service (NASS). The case study uses two releases: September 2026 (47 pages) and October 2026 (48 pages). Each release has a PDF and a zip of CSV files, one CSV per table part.
The table is “Crop Area Planted and Harvested, Yield, and Production in Domestic Units – United States: 2025 and 2026”. In September it is on pages 25 and 26. One row is one crop in the United States, such as Barley, or Alfalfa as a part of “Hay, all”. The 2026 values are forecasts at the report’s date.
Source and licence. Crop Production, released September 11 and October 9, 2026, by the USDA National Agricultural Statistics Service. The report is a work of the US Government and is in the public domain. USDA asks for a credit line; use “USDA National Agricultural Statistics Service”. Nextia Learning changed nothing in the files. The dataset card has the links and the SHA-256 checksums.
Kofi compared four reports before he chose this one. The two Census income and poverty reports keep their tables online as spreadsheets, so their PDFs have no table over two pages. The Bureau of Labor Statistics’ jobs report has the right shape, but its server refuses scripts (403 Forbidden). A learner’s notebook could not download it. Crop Production has the table over two pages, the same table as CSV, a server that answers scripts, and a new release every month.
The data dictionary
Section titled “The data dictionary”The columns, in plain words. The units are printed in the table, and the reader takes them from there.
| Column | What it means | Unit |
|---|---|---|
| Area planted / 2025, 2026 | Land sown with the crop | 1,000 acres |
| Area harvested / 2025, 2026 | Land harvested | 1,000 acres |
| Unit | A word printed after the label on page 26: bushels, tons, pounds, cwt, bales, gallons | — |
| Yield per acre / 2025, 2026 | Harvest per harvested acre | the row’s unit per acre, or pounds (footnote 2) |
| Production / 2025, 2026 | Total harvest | 1,000 of the row’s unit |
Two codes appear in place of numbers: (NA) not available and (X) not applicable. A cell can also be blank. The table’s note says what a blank means: “estimation period has not yet begun”.
First look at the page
Section titled “First look at the page”Before any code, Kofi reads page 25 the way a person does. Six things on it matter for a program. The picture marks them on the real page, with the boxes that the finished reader found.

Text description of the diagram
The picture shows the top of page 25, with the column header and the first nine crop rows. Number 1: four thin vertical rules separate the label column and the four value columns. Number 2: the words “Area planted” stand over two columns, 2025 and 2026, so they are the header of both. Below them, a unit line says “1,000 acres” for each column. Number 3: “Grains and hay” is bold and has no numbers: it is a group name. Number 4: Alfalfa and All other are indented under “Hay, all”: they are its parts. Number 5: the label “Corn for grain” ends with a small 1, a footnote mark printed at 5 points, against 8 points for the text. Number 6: Corn for silage has no value under 2026, in both areas. The empty slots keep their places, so 6,208 stays under “Area harvested / 2025”.
Page 26 does something that the price list in Tables and spreadsheets did not do. It does not add rows. It prints the same 41 rows again, with new columns: the unit, the yield and the production. A wide table was cut into two pages from left to right.

Text description of the diagram
On the left, page 25 shows the area columns. The row Rice is highlighted, with its four area values: 2,812, 2,102, 2,740 and 2,057 thousand acres. On the right, page 26 shows the unit, yield and production columns for the same rows. Rice is highlighted again, with a small mark 2 after its label and the unit cwt. Its yields are 7,544 and 7,690, and its production 206,707 and 158,180. Under the table, the footnote “2 Yield in pounds.” is framed in red. So Rice’s yield is in pounds per acre, although its unit column says cwt. Its production stays in thousands of cwt.
The answer sheet has traps too
Section titled “The answer sheet has traps too”The agency’s zip has one CSV file per table part: crop_p25_t195.csv and crop_p26_t196.csv. A help file explains the format. The first value is a table number, and the second is a line type: t title, h header, u units, d data, f footnote. Kofi reads the page-26 part (a few of its lines):
Not UTF-8: 'utf-8' codec can't decode byte 0x96 in position 274: invalid start byte196,"h","","","Yield per acre","Yield per acre","Production","Production"196,"u","","","","(1,000)","(1,000)"196,"d","Corn for silage","tons",21.8,,135540,196,"d","Spearmint oil","pounds",139,"",1609196,"f","2/ Yield in pounds."What this tells us. The answer sheet must be read with care as well:
- The files are Windows-1252 text, not UTF-8. Byte 0x96 is the dash in the title. Read as UTF-8, the file stops with an error.
- The footnote marks are written
2/, not as small numbers. Indented rows start with two spaces. - The last data line, Spearmint oil, has one value less than the others: the file drops the empty cell at its end. Each of the two parts has one such line.
- The units line is one value short. Read by position,
(1,000)lands under “Yield per acre / 2026”, and “Production / 2026” gets no unit. On the page,(1,000)stands over the two production columns.
So the CSV is a good answer sheet for the values, and a poor one for the units. read_reference() in the case study’s script finds both parts by their title, joins them and treats a short line as blank. That gives 41 rows × 9 columns = 369 cells to check.
Frame the problem
Section titled “Frame the problem”The measure is simple: cells that match the agency’s CSV, out of 369. A cell matches when both hold the same number (2,299 and 2299 are the same), the same code, or both are blank. Every other cell is one of three errors, as in Field-level metrics:
- missing: the agency has a value, and the reading has none, or the reading did not find the row at all;
- extra: the reading has a value where the agency has a blank;
- wrong: both have a value, and they differ.
For Ruth, an extra or wrong value is worse than a missing one. A missing value shows as a gap in the sheet. A value in the wrong cell looks normal, and the board plans with it.
Two more things count, outside the score. Provenance: can the reading show the page and the box of each cell? And cost: what does each month’s run cost in money and time?
A baseline: the page as plain text
Section titled “A baseline: the page as plain text”The quickest reading takes the page’s text, one line per row. The label ends at the leader dots, and the numbers go to the columns from left to right. Here are three lines of page 25, as the PDF library gives them:
Corn for grain 1 ....................................................................... 98,788 96,777 91,258 88,506Corn for silage ........................................................................ (NA) 6,208Proso millet ............................................................................. 442 500 397Predict before you read on: where does 6,208 land? The text has no blank cell, only one space. So 6,208 becomes the second number, “Area planted / 2026”, where the agency has nothing.
Plain text, split at spaces 287 of 369 cells match (wrong 0, missing 65, extra 17) Corn for grain Area planted / 2025 ours None agency '98788' Corn for silage Area planted / 2026 ours '6,208' agency '' Corn for silage Area harvested / 2025 ours None agency '6208'What this tells us. 82 cells are lost, and not one character was misread:
- 34 cells move left past a blank cell, in rows such as Corn for silage, Proso millet and Spearmint oil. Each move makes an extra value in one cell and a missing value in another. These are the errors that Ruth’s team made by hand.
- 48 cells are in rows that the reading cannot find. “Corn for grain 1” is not “Corn for grain”: the footnote mark sticks to the label. Ten rows have a mark.
Alternatives
Section titled “Alternatives”The PDF library’s table finder
Section titled “The PDF library’s table finder”pdfplumber, the course’s PDF library, has a table finder. With its default settings, it looks for lines around every cell. This page has vertical rules but no lines between rows. So the finder returns 3 rows, and each value column is one tall cell that holds the whole column. The label column and the last column are missing, because no rule stands at the table’s outer edges. 0 of 369 cells can be tied to a crop.
Then Kofi tells the finder what the page has: columns from the rules, rows from the text lines, and the table’s two outer edges. This time it gets 321 of 369. Every blank cell is right. The 48 lost cells are the same ten rows with footnote marks: in the library’s text, “Rice ²” is “Rice 2”.
Columns from the rules, rows from the words
Section titled “Columns from the rules, rows from the words”Think of a tailor’s chalk lines on cloth. The tailor does not guess where to cut: the lines are already there. A printed table also draws its own lines. The problem is that a program that reads text sees no lines, only characters in order. So a blank cell disappears, and a small footnote mark looks like part of the label.
The idea is to use the page’s own drawing. pdfplumber gives every word with its box and its font size, and every thin rectangle that the page draws. So the reader does three things:
- Columns from the rules. The thin vertical rules give the column edges. A word belongs to the column that holds the middle of its box. A column with no word on a line is a blank cell, and it keeps its slot.
- Marks by size. A word smaller than 6 points is a footnote mark, kept apart from the label.
- Groups and parts by style. A bold line with no numbers is a group, filled down like a merged category cell. An indented label is a part of the row above it.
Here is a tiny example, on the line “Corn for silage” of page 25:
column edges: [36, 261, 340, 419, 497, 576]Corn x 37.8 to 55.1 middle 46.5 size 8(NA) x 318.6 to 335.0 middle 326.8 size 86,208 x 472.4 to 492.5 middle 482.4 size 8Do it by hand. 326.8 is between 261 and 340, so (NA) is in the first value column, “Area planted / 2025”. 482.4 is between 419 and 497, so 6,208 is in the third, “Area harvested / 2025”. No word has its middle between 340 and 419, or between 497 and 576. Those two cells are blank, and they keep their places.
The reader then joins the pages by the row’s label and its parent, not by stacking them. It takes the units from the header (“1,000 acres”) and from the row on page 26. So “bushels” gives “bushels per acre” and “1,000 bushels”. A footnote that says “Yield in pounds” changes the yield’s unit for the rows that carry its mark. Here are some of Rice’s cells, as the reader returns them:
Rice | group Grains and hay | marks ['2'] Area harvested / 2025 2,740 1,000 acres page 25 box [472.4, 211.3, 492.5, 219.4] Unit cwt None page 26 box [246.5, 210.4, 258.6, 218.4] Yield per acre / 2025 7,544 pounds per acre page 26 box [314.2, 210.4, 334.3, 218.4] Production / 2025 206,707 1,000 cwt page 26 box [462.8, 210.4, 491.8, 218.4]Rules and word positions 369 of 369 cells match (wrong 0, missing 0, extra 0)All 369 cells match. Each cell has its page and its box in points, so the board’s sheet can link every number to its place in the report.
When to use it: printed tables with rules, in a PDF with a text layer. When not to use it: a scanned table, because OCR gives lines of text, not words with font sizes. The course has no scanned table, so that case is not tested. A table without rules is harder too: the edges must come from the gaps between words, which is less sure. What it costs: no money, and about 3 seconds per report on the author’s computer. Almost all of that time is spent finding the pages by their title; reading the two pages takes about 0.01 seconds.
The vision model
Section titled “The vision model”The course’s vision model read the two pages as pictures, with a strict JSON schema. It returned every row, its marks, its unit, and its values exactly as printed, with "" for a blank cell. The answers were recorded twice, on the same pages:
pass1 page 25: 2532 + 1590 tokens, 18.07 s, US$0.02096pass1 page 26: 2532 + 1591 tokens, 18.09 s, US$0.02097Vision model (pass1, recorded) 369 of 369 cells match (wrong 0, missing 0, extra 0)Vision model (pass2, recorded) 369 of 369 cells match (wrong 0, missing 0, extra 0)a box for Rice's yield? NoneThe model reads every value right on these clean, printed pages, and the second pass gave the same rows. It also returned the footnote marks of all 41 rows as the CSV has them. But it gives values, not places: no cell has a box. A month’s reading costs about US$0.04 and 36 seconds, at the list price that the course uses. Prices change: check your provider’s current page.
A fair comparison
Section titled “A fair comparison”Here are all five readings, with the same 369 cells and the same rule for a match:
- Baselines
- Vision model (recorded)
- Rules and word positions
Text description of the chart
Plain text, split at spaces: 287 of 369 (77.8%). The library’s default table finder: 0 of 369. The library with the rules, text rows and the table’s edges: 321 of 369 (87.0%). Rules and word positions: 369 of 369 (100%). The vision model, recorded: 369 of 369 (100%), in both passes.
| Reading | Cells that match | Errors | Page and box per cell | Cost per report |
|---|---|---|---|---|
| Plain text | 287 | 65 missing, 17 extra | no | none |
| Library, default | 0 | 369 missing | no | none |
| Library, rules and edges | 321 | 48 missing | only the grid’s cell | none |
| Rules and word positions | 369 | none | yes, the printed words’ box | none, about 3 s |
| Vision model (recorded) | 369 | none | no | about US$0.04, 36 s |
What this tells us. No reading misread a character. Every error came from structure: a blank cell lost, or a footnote mark stuck to a label. On values, two readings tie at 369. The difference is everything else. Only the word-position reading gives each cell its printed place, and it costs nothing to run every month.
The recommendation
Section titled “The recommendation”Kofi writes to Ruth in her words:
- Use the word-position reader for the monthly table. On the September report, it copied all 369 cells exactly as the agency’s own file has them. Every number in the board’s sheet can link to its page and its place in the report.
- Check every month against the agency’s CSV, while the agency publishes it. A mismatch stops the copy, and a person looks at the page.
- Run the two table checks as well. They work without a CSV, so they keep working on reports that have none.
- Keep the vision model as a second reader, not the first. It agreed on every cell, but it cannot show where a number is printed. Use it to confirm a page, or to read a page that has no text layer.
And what not to do with it:
- Do not treat the 2026 numbers as final. They are forecasts, and the next report revises them.
- Do not point the reader at another table without a check. A new table needs its own comparison with known values.
Checks that need no CSV
Section titled “Checks that need no CSV”Most reports that Ruth reads have no CSV. The table can still check itself, with two rules from its own logic. Business validation checked that a receipt’s total adds up; these checks do the same for a table:
- Parts add up. Alfalfa + All other = “Hay, all”, for each area and production column. The same for wheat and cotton: 16 checks.
- Area × yield = production, after the units. For Rice: 2,740 thousand acres × 7,544 pounds per acre ÷ 100 pounds per cwt = 206,705.6 thousand cwt. The page prints 206,707. A bale of cotton is 480 pounds. That gives 63 checks.
Printed values are rounded, so a check allows the rounding of each value: half of its last digit. For Rice, that is 51.9 thousand cwt. On September’s table, 79 of 79 checks pass. Three rows have no check at all: Cottonseed, Maple syrup and Mushrooms, whose yields are (X) or (NA).
Common mistake
A digit pair swapped in a big number
Symptom: The board’s sheet shows wheat production for 2025 as 1,948,537 thousand bushels. Nothing looks odd: it is a plausible number.
Cause: This is a constructed case: someone typed 1,948,537 for 1,984,537. Two digits changed places, the kind of slip that the team made by hand.
Diagnose: Run the checks. Two fail, and both point at the same cell:
parts add up | Wheat, all Production / 2025 | printed 1948537.0 computed 1984537.0 allowed 2.0area x yield | Wheat, all Production / 2025 | printed 1948537.0 computed 1984945.3 allowed 1889.2The parts (Winter + Durum + Other spring) give 1,984,537. Area × yield gives about 1,984,945.
Fix: Open the cell’s box on page 26 and read the printed value. A check can say that something is wrong, but not which side is wrong. The box tells a person where to look.
Consequence in AI work: an extracted table that is never checked fails silently. A model asked “how much wheat in 2025?” quotes the wrong cell with full confidence. Checks from the data’s own logic catch errors that no confidence score shows.
End to end on new input: the October report
Section titled “End to end on new input: the October report”A month later, the agency publishes the next Crop Production. Kofi runs the same reader on it, with no change to the code:
pages [26, 27]October, rules and word positions 369 of 369 cells match (wrong 0, missing 0, extra 0)82 of 82 checks pass111 cells changed since September Corn for grain | Yield per acre / 2026: 178.5 -> 181.2 (page 27, box [393.7, 145.9, 413.8, 154.0]) Corn for grain | Production / 2026: 15,799,759 -> 16,033,944 (page 27, box [531.4, 145.9, 571.4, 154.0])What this tells us. The table moved one page down, to pages 26 and 27, and the reader found it by its title. A reader that used page numbers would have read the wrong pages. The CSV files moved too, from crop_p25_t195.csv to crop_p26_t195.csv, and the reference reader found them by their title as well. All 369 cells match October’s CSV. 82 of 82 checks pass: 3 more than in September, because new forecasts filled blank cells.
The new run also answers the board’s real question: what changed? 111 cells changed since September. The corn forecast for 2026 went up, from 15,799,759 to 16,033,944 thousand bushels. Six blank cells received values, such as the first 2026 forecasts for rye, canola and sunflower. Each change comes with its page and its box in the new report. The recorded vision model also matched all 369 cells of October’s table.
The same reader also read the metric version of the table, on the next two pages. It matched 328 of 328 cells, in both releases. That table has its units in the header (hectares, metric tons) and no unit column. The reader was not written for it.
Insights and limits
Section titled “Insights and limits”- Structure, not characters. Every reading that failed saw every character right. The losses came from blank cells and footnote marks. This is the lesson of Tables and spreadsheets again, on a real report.
- One clean report is an easy test. These pages are born digital, with a text layer and printed rules. The vision model’s 369 of 369 is real, but it says nothing about a scan or a photo.
- The reader knows this report’s habits. It needs vertical rules, labels that end in leader dots, marks smaller than 6 points, and a “(continued)” page with the same rows. A report with another layout needs a new comparison with known values.
- The CSV checks the extraction, not the statistics. The PDF and the CSV come from the same agency system. Agreement proves that the copy is right, not that the forecast is right.
- The checks have blind spots. A wrong value in Cottonseed, Maple syrup or Mushrooms passes every check. A wrong yield and a wrong production that agree with each other would pass too.
Responsible use
Section titled “Responsible use”- Credit the source. The report is public domain, and USDA asks for a credit line: “USDA National Agricultural Statistics Service”. Say which release each number comes from.
- Say “forecast” when it is a forecast. A board decision that is based on a September forecast should say so, and be reviewed after the next release.
- Be polite to the agency’s server. Download each release once, keep a copy with its checksum, and do not download in a loop. For that reason, the notebook falls back to a labs copy.
- Keep a person on a mismatch. When the reader and the CSV disagree, or a check fails, a person opens the page. The reader must never “fix” a number by itself.
Make it a portfolio piece
Section titled “Make it a portfolio piece”This case study shows an employer that you can turn a real public PDF into checked data, with evidence for every value. Make it yours with one change: another table in this report, another agency’s report with a CSV, or a table without rules. Then make it public, and easy to read in five minutes.
What to put in the repository:
README.md, the page that people read first (template below).- The notebook, run from top to bottom, with its outputs, and
report_table.py. results.csv: one line per cell with the value, the unit, the page, the box and the match result.- The data source and licence: the report’s name, its release date, the agency, “public domain”, and the checksums. Public domain lets you keep a copy.
A README template:
# Extracting a two-page table from a USDA report, with evidence per cell
## ProblemA planning team copies ~370 numbers a month from the USDA Crop Production report,a table over two pages. Typing errors go unseen. Goal: copy it automatically, with thepage and box of every number, and prove the copy right.
## Data and licenceUSDA NASS, Crop Production, September and October 2026 releases (PDF + the agency'sCSV of the same table). US Government work, public domain. SHA-256 in data/SHA256SUMS.
## ApproachFind the table by its title. Columns from the printed rules, rows from the words,footnote marks by font size, groups and parts by style. Join the pages by row label.Units from the header, the row and the footnotes. Compare cell by cell with the CSV.
## Results (369 cells)Plain text 287; PDF library default 0; library with rules 321; word positions 369;vision model (recorded) 369, but no boxes and US$0.04 per report.New input (October): 369/369, 82/82 checks, 111 cells changed.
## LimitsOne report layout; born-digital pages only; the CSV checks the copy, not the statistics.How to describe it in an interview, in three sentences: “I built a reader that extracts a two-page table from a USDA report with the page and box of every cell. Checked cell by cell against the agency’s CSV, it got 369 of 369, where plain text got 287. It ran unchanged on the next month’s report, and the table’s own sums caught a swapped digit pair.”
Go further:
- Add a check that the CSV’s footnote marks equal the PDF’s marks. Add one that takes each unit from the page, not from the CSV’s units line.
- Read the table without its rules: find the column edges from the gaps between the numbers, and compare the score.
- Run the reader on the release from a year earlier, and list what breaks.
- Render the two pages as pictures, run the course’s OCR, and see what the word-position idea needs when there is no text layer.
Knowledge check
Section titled “Knowledge check”Check your understanding
Plain text and the library with rules both read every character right, yet they score 287 and 321. Explain where each loses its cells.
Show the answer
Plain text has no columns, only words in order. A blank cell becomes a single space, so the next value moves left into the wrong column. That makes 34 cells extra or missing, in rows such as Corn for silage. The library with rules keeps the columns, so its blank cells are right. Both lose the ten rows with a footnote mark, 48 cells. The mark is a small number after the label. In text it becomes part of the label, and “Corn for grain 1” does not match “Corn for grain”. The word-position reader keeps marks apart by their font size.
Does your answer have the main points of ours?
Sign in and enroll in the course to save your answers. Every check counts toward the certificate.
Check your understanding
The vision model also matched 369 of 369 cells, twice. Ruth asks why Kofi does not use it as the reader. What does he answer?
Show the answer
The board wants to see where each number is printed, and the model returns values without boxes. The word-position reader gives every cell its page and box, at no cost and in about 3 seconds. The model costs about US$0.04 and 36 seconds per report, and its answer could change on a harder page. Its perfect score is on clean, born-digital pages only. So Kofi keeps it as a second reader. It can confirm a page, or read a page that has no text layer and so no word positions.
Does your answer have the main points of ours?
Sign in and enroll in the course to save your answers. Every check counts toward the certificate.
Check your understanding
Next year the agency stops publishing the CSV. Which parts of the case study still protect Ruth's sheet, and what is lost?
Show the answer
The reader still works: it needs only the PDF. The two checks still run: parts add up, and area × yield gives production within the rounding. They caught a swapped digit pair in the constructed case. The boxes still let a person check any number on the page. What is lost is the cell-by-cell proof. A wrong value in Cottonseed, Maple syrup or Mushrooms passes every check, and so do a wrong yield and production that agree. Kofi should check a sample of cells by hand each month, and run the vision model as a second reader for those rows.
Does your answer have the main points of ours?
Sign in and enroll in the course to save your answers. Every check counts toward the certificate.
Recap
- You found a table by its title, not its page number: pages 25–26 in September, 26–27 in October.
- Plain text matched 287 of 369 cells: blank cells move values left, and footnote marks stick to labels. The library’s default finder matched 0; with the page’s rules and edges, it matched 321.
- Columns from the rules, rows from the words, marks by size and groups by style matched 369 of 369. Every cell has a unit, a page and a box. The recorded vision model also matched 369, but with no boxes.
- The agency’s CSV is an answer sheet for values. It has traps of its own: Windows-1252, a short last line, and a units line one cell short.
- Two checks need no CSV: parts add up and area × yield. They caught a swapped digit pair. October’s report ran unchanged: 369 of 369, and 111 cells changed.
Next, the final assignment: build and evaluate an extraction pipeline of your own.
Next: Final assignment