compass.plugin.post_processing.add_document_name#

add_document_name(db)[source]#

Add a document_name column to the database

The document_name is derived from the source path, if available.

Parameters:

db (pandas.DataFrame) – The database containing extraction results, which may include a ‘source’ column.

Returns:

pandas.DataFrame – The updated database with an added ‘document_name’ column, if applicable.