Skip to content

Add API to supply pre-computed figures/tables and areas to ignore #1375

Draft
lfoppiano wants to merge 6 commits into
masterfrom
feature/add-ignore-areas-api
Draft

Add API to supply pre-computed figures/tables and areas to ignore #1375
lfoppiano wants to merge 6 commits into
masterfrom
feature/add-ignore-areas-api

Conversation

@lfoppiano

Copy link
Copy Markdown
Member

TBC

@lfoppiano
lfoppiano marked this pull request as draft March 3, 2026 08:04
@lfoppiano
lfoppiano force-pushed the feature/add-ignore-areas-api branch 2 times, most recently from 275a28e to 63f0189 Compare March 3, 2026 08:05
@lfoppiano
lfoppiano force-pushed the feature/add-ignore-areas-api branch from 20d703a to 647249a Compare June 14, 2026 05:41
}
}
// Check if we're switching blocks
if (tok.getBlockPtr() != token.getBlockPtr()) {
graphicVector = false;
graphicBitmap = false;

double pageHeight = block.getPage().getHeight();
Introduce a Typed Areas API allowing clients to declare rectangular PDF
regions with a type (figure, table, ignore, paratext) for specialized
processing. Layout tokens are filtered by these areas: figure/table
regions are routed to the dedicated parsers (tables grouped per area),
while ignore/paratext regions are excluded from body processing.

- New layout types TypedArea and AreaType
- Document.filterLayoutTokensByTypedAreas categorises tokens and recomputes
  block pointers; excluded tokens are dropped from body pieces
- typedAreas threaded through GrobidAnalysisConfig and the REST endpoints
  (header, header-funding, fulltext, fulltext-asset, references) via a
  parseTypedAreas JSON helper
- Documentation (Typed-Areas-API.md, Grobid-service.md, index.md)

Squashed from feature/add-ignore-areas-api and rebased onto master,
integrating with the concurrent debug-labelling feature.
Signed-off-by: Luca Foppiano <luca@foppiano.org>
@lfoppiano
lfoppiano force-pushed the feature/add-ignore-areas-api branch from 5607763 to f6f974a Compare July 21, 2026 15:40
Signed-off-by: Luca Foppiano <luca@foppiano.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant