draw_tokens: Inspect token bounding boxes

Description Usage Arguments Details Value Examples

View source: R/inspect_output.R

Description

Plots the token (i.e., word) bounding boxes identified by Document AI (DAI) onto images of the submitted document. Generates an annotated .png file for each page in the original document.

Usage

1
draw_tokens(json, dir = getwd())

Arguments

json

filepath of a JSON file obtained using dai_async()

dir

path to the desired output directory.

Details

Not vectorized, but documents can be multi-page.

Value

no return value, called for side effects

Examples

1
2
3
4
## Not run: 
draw_tokens("pdf_output.json", dir = tempdir())

## End(Not run)

daiR documentation built on June 11, 2021, 5:16 p.m.