NerEntityFilter#

class NerEntityFilter(config)#

Bases: Filter

Takes a prediction field of the form:

[ { “start”: int, “end”: int, “label”: str, “text”: str }, … ]

and emits Squirro entities under doc.fields[“entities”].

Parameters:
  • entities_field (str) – Field with list of text entities

  • output_field (str, 'entities') – Field to write resulting entities

  • property_name (str, 'category') – Name of the property to use for the entity category

Methods Summary

process_doc(doc)

Process a document

Methods Documentation

process_doc(doc)#

Process a document

Parameters:

doc (Document) – Document

Returns:

Processed document

Return type:

Document