Utilities for Chunk Documents

Module Contents#

class relevanceai.utils.doc_utils.chunk_doc_utils.ChunkDocUtils#

This is created as a Mixin for others to easily add to their classes

classmethod get_chunk(cls, chunk_field, doc)#
classmethod get_field_across_chunks(cls, chunk_field, field, doc)#
run_function_across_chunks(self, function: Callable, chunk_field, field: str = None, output_field: str = None, doc={})#

Run a function on a field across chunks Params: function:

Any function to run across documents


The field is AFTER the Chunk Field

run_function_across_chunks_across_docs(self, function: Callable, chunk_field: str, field: str = None, output_field: str = None, docs=[])#

Run a function across chunk field in documents