Class TokenTextSplitter

java.lang.Object
org.springframework.ai.transformer.splitter.TextSplitter
org.springframework.ai.transformer.splitter.TokenTextSplitter
All Implemented Interfaces:
Function<List<Document>,List<Document>>, DocumentTransformer

public class TokenTextSplitter extends TextSplitter
A TextSplitter that splits text into chunks of a target size in tokens.
Author:
Raphael Yu, Christian Tzolov, Ricken Bazolo
  • Constructor Details

    • TokenTextSplitter

      public TokenTextSplitter()
    • TokenTextSplitter

      public TokenTextSplitter(boolean keepSeparator)
    • TokenTextSplitter

      public TokenTextSplitter(int chunkSize, int minChunkSizeChars, int minChunkLengthToEmbed, int maxNumChunks, boolean keepSeparator)
  • Method Details