Class OracleDocumentSplitter
java.lang.Object
dev.langchain4j.data.document.splitter.oracle.OracleDocumentSplitter
- All Implemented Interfaces:
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, wait
Methods inherited from interface DocumentSplitter
splitAll
-
Constructor Details
-
OracleDocumentSplitter
Create a document splitter
-
-
Method Details
-
split
Split a single document- Specified by:
split
in interfaceDocumentSplitter
- Parameters:
document
- The Document to be split.- Returns:
- A list of TextSegment objects derived from the input Document.
-
splitAll
Split a list of documents- Specified by:
splitAll
in interfaceDocumentSplitter
- Parameters:
list
- The list of Documents to be split.- Returns:
- A list of TextSegment objects derived from the input Documents.
-
split
public String[] split(String content) throws SQLException, com.fasterxml.jackson.core.JsonProcessingException Split the provided text into parts- Throws:
SQLException
com.fasterxml.jackson.core.JsonProcessingException
-