Interface TextSplitter

All Known Implementing Classes:
MaxLengthBasedTextSplitter, TiktokenTextSplitter
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public interface TextSplitter
Implementations are used by the SplitDocumentsChain. A TextSplitter takes an input text and creates a List with one or more result strings based on the original text.
  • Method Summary

    Modifier and Type Method Description
    List<String> split​(String text)
    Splits a text into one or more subtexts
  • Method Details

    • split

      List<String> split​(String text)
      Splits a text into one or more subtexts
      Parameters:
      text - text to split
      Returns:
      List with text partitions