SquirroItemLoader#

class SquirroItemLoader(config)#

Bases: Loader

Loads in a list of items (with the data structure of a Squirro Item) and transforms them to Document items. The transformation is done using squirro.lib.nlp.utils.squirro_utils.squirro_item_to_nlp_doc().

Parameters

type (str) – squirro_item

Example

{
    "step": "loader",
    "type": "squirro_item",
    "fields": [ "text", "label" ]
}

Methods Summary

process(data)

Convert Items (with data structure of a Squirro Item) to nlp Documents and yield

Methods Documentation

process(data)#

Convert Items (with data structure of a Squirro Item) to nlp Documents and yield

Parameters

data (dict) – dictionary with items and parameters

Returns

Document generator

Return type

generator(Documents)