ParentChildChunkerConfig#

class scikitplot.corpus.ParentChildChunkerConfig(parent_size=2000, child_size=400, child_overlap=0, separators=('\n\n', '\n', '. ', ' ', ''), emit_parents=True)[source]#

Configuration for ParentChildChunker.

Parameters:
parent_sizeint, default=2000

Largest parent, in characters.

child_sizeint, default=400

Largest child, in characters; smaller than parent_size.

child_overlapint, default=0

Context characters of a child, as chunk_overlap of RecursiveChunkerConfig, within its parent.

separatorstuple of str, default=(”nn”, “n”, “. “, “ “, “”)

Separators for both levels, coarsest first, ending with "".

emit_parentsbool, default=True

Emit each parent before its children. False emits children only (each still records its parent’s span in parent_span).

Parameters:
  • parent_size (int)

  • child_size (int)

  • child_overlap (int)

  • separators (tuple[str, ...])

  • emit_parents (bool)

child_overlap: int = 0#
child_size: int = 400#
emit_parents: bool = True#
parent_size: int = 2000#
separators: tuple[str, ...] = ('\n\n', '\n', '. ', ' ', '')#