reassign_tokens: Assign tokens to new blocks

Description Usage Arguments Details Value Examples

View source: R/process_output.R

Description

This is a specialized function for use in connection with text reordering. It modifies a token dataframe by assigning new block bounding box values to a subset of tokens based on prior modifications made to a block dataframe.

Usage

1
reassign_tokens(token_df, block_df)

Arguments

token_df

a dataframe generated by build_token_df()

block_df

a dataframe generated by dair::split_block() or dair::build_block_df()

Details

The token and block data frames provided as input must be from the same JSON output file.

Value

a token data frame

Examples

1
2
3
4
## Not run: 
new_token_df <- reassign_tokens(token_df, new_block_df)

## End(Not run)

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