- Added two new functions to facilitate processor management:
get_ids_by_type()
andget_versions_by_type()
. - Added vignette on processor management.
- Bug fixes.
- Major revision.
- Added several processor-related functions following an update of the Google Document AI REST API. These include
list_processor_types()
,create_processor()
,enable_processor()
,disable_processor()
, anddelete_processor()
. - Added
get_text()
andget_tables()
, which replacetext_from_dai_response()
,text_from_dai_file()
,tables_from_dai_response()
andtables_from_dai_file()
. - Added
get_entities()
anddraw_entities()
. - Removed
dai_tab_sync()
anddai_tab_async()
following Google's discontinuation of the v1beta2 endpoint on 31 January 2024. - Modified the parameters of the
draw*()
functions for better consistency with other functions. - Renamed the
.R
files and regrouped the functions. - Added prettier messages using the
cli
package.
- Added the function
make_hocr
to convert DAI output to hOCR files, thereby facilitating the creation of searchable PDFs.
- Changed the
build_token_df()
andbuild_block_df()
functions so they can take as input response objects fromdai_sync()
in addition to json files fromdai_async()
. - Changed the
build_token_df()
andbuild_block_df()
functions to include confidence scores in the dataframe, so as to enable filtering on confidence.
- Changed the "
draw_*
" functions so they work with response objects (fromdai_sync()
anddai_sync_tab()
) as well as with json files fromdai_async_tab()
. - Changed the "
draw_*
" functions to allow customizing color and thickness of lines around bounding boxes. - Modified
tables_from_dai_response()
so that it handles response objects fromdai_sync()
with form parser processors.
- Added three new functions relating to processors:
get_processors()
,get_processor_info()
, andget_processor_versions()
. - Added parameter
proc_v
todai_sync()
anddai_async
, allowing for specification of processor version.
- Added two new functions:
dai_notify()
andmerge_shards()
- Modified
text_from_dai_response()
andtext_from_dai_file()
to allow saving the output straight to a text file. - Fixed a bug in
dai_status()
that caused an error when processing responses from the v1beta2 endpoint (dai_tab_async()
).
- Changed the "
draw_*
" functions to allow custom output filenames.
- Added more support documentation in connection with JOSS release.
- Added new function (
draw_blocks_new()
) to inspect block bounding boxes after reprocessing.
- Initial CRAN version.
- Simplified the auth functions to avoid modifying the global environment. Tokens are no longer held in an internal .auth object. Removed dai_has_token(), dai_deauth(), and create_folder().
- Revised
draw_blocks()
,draw_paragraphs()
,draw_lines()
, anddraw_tokens()
functions. These functions no longer require supplying a pdf file, as they get the images from a base64-encoded string in the json file.
- New processing functions adapted to the new stable release of Document AI API (v1). The
dai_sync()
/dai_async()
functions now access the new v1 endpoint, which has foreign language support. However, the v1 endpoint currently does not support table extraction, so the old processing functions (which access the v1beta2 endpoint) are kept under the new namesdai_sync_tab()
anddai_async_tab()
. I expect this to be a temporary solution until DAI's capabilities are consolidated in a single endpoint, at which stage the*_tab()
functions will be phased out.
- New table extraction functions.
- New helper functions and more robust code.
- Revised and expanded auth functions.
- Initial Github release.