JSONLoader

class squirro.lib.nlp.steps.loaders.JSONLoader(config)

Bases: squirro.lib.nlp.steps.loaders.Loader

Loads Document for JSON files.

Parameters
  • type (str) – json

  • per_line (bool, False) – Whether or not to load each line as a separate JSON object

Methods Summary

process(directory)

Process a directory of json files and yield documents.

Methods Documentation

process(directory)

Process a directory of json files and yield documents.

Parameters

directory (str) – path to directory with *.json files

Returns

Generator of Documents read from JSON files

Return type

generator(Document)