|
Advanced Chunk Processing Library 0.2.0
A comprehensive C++ library for advanced data chunking strategies and processing operations
|
Template class for semantic-based content chunking. More...
#include <advanced_structures.hpp>
Collaboration diagram for advanced_structures::SemanticChunker< ContentType, ModelType >:Public Member Functions | |
| SemanticChunker (double threshold=0.7, ModelType custom_model=ModelType()) | |
| Construct a new Semantic Chunker. | |
| std::vector< ContentType > | chunk (const ContentType &content) |
| Chunk content based on semantic boundaries. | |
| void | setModel (ModelType new_model) |
| Set a new NLP model. | |
| void | setSimilarityThreshold (double threshold) |
| Set new similarity threshold. | |
Private Attributes | |
| ModelType | model |
| NLP model instance. | |
| double | similarity_threshold |
| Threshold for determining chunk boundaries. | |
Template class for semantic-based content chunking.
SemanticChunker splits content based on semantic boundaries using configurable NLP models and similarity metrics.
| ContentType | Type of content to be chunked |
| ModelType | Type of NLP model to use for similarity calculations |
Definition at line 39 of file advanced_structures.hpp.
|
inlineexplicit |
Construct a new Semantic Chunker.
| threshold | Similarity threshold for chunk boundaries (default: 0.7) |
| custom_model | Custom NLP model instance (optional) |
Definition at line 51 of file advanced_structures.hpp.
| std::vector< ContentType > advanced_structures::SemanticChunker< ContentType, ModelType >::chunk | ( | const ContentType & | content | ) |
Chunk content based on semantic boundaries.
| content | Input content to be chunked |
Referenced by main().
|
inline |
Set a new NLP model.
| new_model | New model instance to use |
Definition at line 67 of file advanced_structures.hpp.
References advanced_structures::SemanticChunker< ContentType, ModelType >::model.
|
inline |
Set new similarity threshold.
| threshold | New threshold value between 0.0 and 1.0 |
Definition at line 76 of file advanced_structures.hpp.
References advanced_structures::SemanticChunker< ContentType, ModelType >::similarity_threshold.
|
private |
NLP model instance.
Definition at line 41 of file advanced_structures.hpp.
Referenced by advanced_structures::SemanticChunker< ContentType, ModelType >::setModel().
|
private |
Threshold for determining chunk boundaries.
Definition at line 42 of file advanced_structures.hpp.
Referenced by advanced_structures::SemanticChunker< ContentType, ModelType >::setSimilarityThreshold().