handlers#

class predict_backend.ml.nlp.handlers.PersistenceHandler#

Bases: ABC

Interface. It provides a common way to store and access data produced by the nlp module. This way every component can save its output in a table stored in a persistence handler.

abstract get_doc_data(doc_id)#
Return type:

Dict

abstract get_doc_entities(doc_id)#
Return type:

DataFrame

abstract get_doc_events(doc_id)#
Return type:

DataFrame

abstract get_doc_ids()#
abstract get_table(table)#
abstract init_persistence()#
abstract insert_doc(doc, row_data)#
abstract start_buffered_ingestion()#
abstract stop_buffered_ingestion()#