LogFieldsDebugger#

class LogFieldsDebugger(config)#

Bases: Debugger

The field Debugger logs values of different fields of the Document at different stages of the Pipeline. This is useful for debugging purposes.

Parameters
  • max_length (int, 100) – Maximum length of the logged value of a string type field. E.g (Can be used to limit the length of printed body)

  • log_level (str, "debug") – Debugging level one of [“debug”,”info”,”warning”]

Example

{
    "step": "debugger",
    "type": "log_fields",
    "fields": ["body"],
    "log_level": "warning"
}

Methods Summary

process_doc(doc)

Process a document

train(docs)

Train on a step of a set of documents

Methods Documentation

process_doc(doc)#

Process a document

Parameters

doc (Document) – Document

Returns

Processed document

Return type

Document

train(docs)#

Train on a step of a set of documents

Parameters

docs (generator(Document)) – Generator of documents

Returns

Generator of processed documents

Return type

generator(Document)