Class OracleDocumentSplitter
java.lang.Object
dev.langchain4j.data.document.splitter.oracle.OracleDocumentSplitter
- All Implemented Interfaces:
dev.langchain4j.data.document.DocumentSplitter
public class OracleDocumentSplitter
extends Object
implements dev.langchain4j.data.document.DocumentSplitter
Split documents
Use dbms_vector_chain.utl_to_chunks to split documents.
You can specify how to split the content such as by words, characters,
or vocabulary to match a tokenizer in the preference.
Some example preferences
To split by words:
{"by": "words", "max": 100}
To split by characters:
{"by": "characters", "max": 100}
-
Constructor Summary
ConstructorsConstructorDescriptionOracleDocumentSplitter(Connection conn, String pref) Create a document splitter -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.langchain4j.data.document.DocumentSplitter
splitAll
-
Constructor Details
-
OracleDocumentSplitter
Create a document splitter
-
-
Method Details
-
split
public List<dev.langchain4j.data.segment.TextSegment> split(dev.langchain4j.data.document.Document document) Split a single document- Specified by:
splitin interfacedev.langchain4j.data.document.DocumentSplitter
-
splitAll
-
split
public String[] split(String content) throws SQLException, com.fasterxml.jackson.core.JsonProcessingException Split the provided text into parts- Throws:
SQLExceptioncom.fasterxml.jackson.core.JsonProcessingException
-