ProximityValidation

class squirro.lib.nlp.steps.analyzers.ProximityValidation(config)

Bases: squirro.lib.nlp.steps.analyzers.Analyzer

Validation analyzer for a proximity filter

Parameters
  • type (str) – proximity_validation

  • input_field (str, None) – Field to use as original text

  • input_fields (list, None) – List of fields to use as original text

  • not_class (str, None) – This class includes all neg/opposite elements, which do not belong to any other class

Methods Summary

process(docs)

Process a set of documents

train(docs)

Train on a step of a set of documents

Methods Documentation

process(docs)

Process a set of documents

Parameters

docs (generator(Document)) – Generator of documents

Returns

Analysis

Return type

dict

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)