@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class HierarchicalChunkingConfiguration extends Object implements Serializable, Cloneable, StructuredPojo
Settings for hierarchical document chunking for a data source. Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
You configure the number of tokens to overlap, or repeat across adjacent chunks. For example, if you set overlap tokens to 60, the last 60 tokens in the first chunk are also included at the beginning of the second chunk. For each layer, you must also configure the maximum number of tokens in a chunk.
Constructor and Description |
---|
HierarchicalChunkingConfiguration() |
Modifier and Type | Method and Description |
---|---|
HierarchicalChunkingConfiguration |
clone() |
boolean |
equals(Object obj) |
List<HierarchicalChunkingLevelConfiguration> |
getLevelConfigurations()
Token settings for each layer.
|
Integer |
getOverlapTokens()
The number of tokens to repeat across chunks in the same layer.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setLevelConfigurations(Collection<HierarchicalChunkingLevelConfiguration> levelConfigurations)
Token settings for each layer.
|
void |
setOverlapTokens(Integer overlapTokens)
The number of tokens to repeat across chunks in the same layer.
|
String |
toString()
Returns a string representation of this object.
|
HierarchicalChunkingConfiguration |
withLevelConfigurations(Collection<HierarchicalChunkingLevelConfiguration> levelConfigurations)
Token settings for each layer.
|
HierarchicalChunkingConfiguration |
withLevelConfigurations(HierarchicalChunkingLevelConfiguration... levelConfigurations)
Token settings for each layer.
|
HierarchicalChunkingConfiguration |
withOverlapTokens(Integer overlapTokens)
The number of tokens to repeat across chunks in the same layer.
|
public List<HierarchicalChunkingLevelConfiguration> getLevelConfigurations()
Token settings for each layer.
public void setLevelConfigurations(Collection<HierarchicalChunkingLevelConfiguration> levelConfigurations)
Token settings for each layer.
levelConfigurations
- Token settings for each layer.public HierarchicalChunkingConfiguration withLevelConfigurations(HierarchicalChunkingLevelConfiguration... levelConfigurations)
Token settings for each layer.
NOTE: This method appends the values to the existing list (if any). Use
setLevelConfigurations(java.util.Collection)
or withLevelConfigurations(java.util.Collection)
if you want to override the existing values.
levelConfigurations
- Token settings for each layer.public HierarchicalChunkingConfiguration withLevelConfigurations(Collection<HierarchicalChunkingLevelConfiguration> levelConfigurations)
Token settings for each layer.
levelConfigurations
- Token settings for each layer.public void setOverlapTokens(Integer overlapTokens)
The number of tokens to repeat across chunks in the same layer.
overlapTokens
- The number of tokens to repeat across chunks in the same layer.public Integer getOverlapTokens()
The number of tokens to repeat across chunks in the same layer.
public HierarchicalChunkingConfiguration withOverlapTokens(Integer overlapTokens)
The number of tokens to repeat across chunks in the same layer.
overlapTokens
- The number of tokens to repeat across chunks in the same layer.public String toString()
toString
in class Object
Object.toString()
public HierarchicalChunkingConfiguration clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.