Class TextDocumentParser

java.lang.Object
com.alibaba.cloud.ai.document.TextDocumentParser
All Implemented Interfaces:
DocumentParser

public class TextDocumentParser extends Object implements DocumentParser
Since:
2024-12-08 21:13
Author:
HeYQ
  • Constructor Details

    • TextDocumentParser

      public TextDocumentParser()
    • TextDocumentParser

      public TextDocumentParser(Charset charset)
  • Method Details

    • parse

      public List<org.springframework.ai.document.Document> parse(InputStream inputStream)
      Description copied from interface: DocumentParser
      Parses a given InputStream into a Document. The specific implementation of this method will depend on the type of the document being parsed.

      Note: This method does not close the provided InputStream - it is the caller's responsibility to manage the lifecycle of the stream.

      Specified by:
      parse in interface DocumentParser
      Parameters:
      inputStream - The InputStream that contains the content of the Document.
      Returns:
      The parsed Document.