Text tools

Split a document into chunks

Splits at headings, paragraphs, sentences and words, in that order of preference, so chunks stay readable. Markdown chunks never cross a heading and carry their heading path. Each chunk is an exact slice of the input with its character offsets.

get/v1/text/chunk

Request

  • Base URL: https://api.dharun.dev
  • URL: https://api.dharun.dev/v1/text/chunk
  • Auth: none declared

Query parameters

textstring

The text (or POST it).

sizeinteger

Largest chunk in characters, overlap included, 100 to 20000. Default 1000.

overlapinteger

Characters repeated from the previous chunk, up to half the size. Default a tenth of the size.

format'auto' | 'markdown' | 'text'

Default auto: Markdown if the text has headings or code fences.

Response

Success

dataunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.