LogFieldsDebugger

class squirro.lib.nlp.steps.debuggers.LogFieldsDebugger(config)

Bases: squirro.lib.nlp.steps.debuggers.Debugger

Field Debugger Class. Can be used to print values of different fields in the nlp doc at different stages of the nlp pipeline. 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”]

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)