Whatever message this page gives is out now! Go check it out!
docService.split( documents [, options] )Parameter | Type | Required | Description |
|---|---|---|---|
documents | Array | Required | Array of document Structs as returned by load(). |
options | Struct | Optional | Splitting configuration. Keys: splitterType (String, default "recursive": valid values: recursive, paragraph, sentence, line, character, word, regex); chunkSize (Numeric, default 1000); chunkOverlap (Numeric, default 100); separators (Array of String, for recursive splitter); regexPattern (String, required when splitterType = "regex"). |
text (String) and metadata (Struct).segments = docService.split(documents, {
splitterType: "recursive",
chunkSize: 1000,
chunkOverlap: 100
});
writeOutput("Created #arrayLen(segments)# segments");