Transformations > Chunking transformation > Chunking methods
  

Chunking methods

The Chunking transformation offers different chunking methods that you can use to split text into chunks.
You can choose one of the following chunking methods to chunk one input string field at a time:
Sentence splitting
Split the text by sentences. Sentence splitting is useful for accurately analyzing and understanding text structure to summarize and analyze content. Sentence boundaries are detected by punctuation and through formal list items. For example, list items that begin with letters or numbers, such as A) or 1., are counted as individual sentences regardless of whether or not they have ending punctuation. Alternatively, list items that begin with bullet points or en dashes aren't automatically detected as individual sentences and are chunked based off of punctuation.
For example, the text "The quick brown fox jumps over the lazy dog. It is a sunny day." is split into the following sentence chunks:
"The quick brown fox jumps over the lazy dog.", "It is a sunny day."
Word splitting
Split the text based on a configured number of words. Word splitting is useful for preserving word meanings and relationships, like names or locations, without aligning to sentence boundaries. Set a word chunking limit that's likely to capture common phrases or full sentences.
For example, the text "The quick brown fox jumps over the lazy dog. It is a sunny day." is split into the following chunks of five words each:
"The quick brown fox jumps", "jumps over the lazy dog.", "dog. It is a sunny", "sunny day."
Fixed length character splitting
Split the text based on a configured fixed number of characters. This method might split text in the middle of sentences, but it preserves whole words. Fixed length character splitting is useful for scenarios when you want to ensure near constant chunk sizes.
For example, the text "The quick brown fox jumps over the lazy dog. It is a sunny day." is split into the following chunks of 10 characters each:
"The quick ", " quick ", " brown fox", "fox jumped", "jumped ", " over the ", " lazy dog.", "It is a ", " sunny day", "day."
Word splitting and fixed length character splitting create a 10 percent overlap between chunks to preserve whole words and sentences. The Chunking transformation rounds up when calculating the overlap. For example, 10 percent of a word chunking limit that's set to five words equals a 0.5 word overlap, so the transformation creates a one word overlap.