This pull request includes changes to various dataclasses to improve performance by using __slots__ and adding detailed docstrings for better documentation. The most important changes include modifications to the Chunk, SemanticSentence, SemanticChunk, Sentence, and SentenceChunk classes.
Changes to dataclasses for performance and documentation:
src/chonkie/chunker/base.py: Modified the Chunk class to use __slots__ for performance and added detailed docstrings.
src/chonkie/chunker/semantic.py: Modified the SemanticSentence class to use __slots__ for performance, added detailed docstrings, and implemented a custom __init__ method.
src/chonkie/chunker/semantic.py: Modified the SemanticChunk class to use __slots__ for performance, added detailed docstrings, and implemented a custom __init__ method.
src/chonkie/chunker/sentence.py: Modified the Sentence class to use __slots__ for performance and added detailed docstrings.
src/chonkie/chunker/sentence.py: Added the SentenceChunk class with __slots__ for performance, detailed docstrings, and a custom __init__ method.
This pull request includes changes to various dataclasses to improve performance by using
__slots__
and adding detailed docstrings for better documentation. The most important changes include modifications to theChunk
,SemanticSentence
,SemanticChunk
,Sentence
, andSentenceChunk
classes.Changes to dataclasses for performance and documentation:
src/chonkie/chunker/base.py
: Modified theChunk
class to use__slots__
for performance and added detailed docstrings.src/chonkie/chunker/semantic.py
: Modified theSemanticSentence
class to use__slots__
for performance, added detailed docstrings, and implemented a custom__init__
method.src/chonkie/chunker/semantic.py
: Modified theSemanticChunk
class to use__slots__
for performance, added detailed docstrings, and implemented a custom__init__
method.src/chonkie/chunker/sentence.py
: Modified theSentence
class to use__slots__
for performance and added detailed docstrings.src/chonkie/chunker/sentence.py
: Added theSentenceChunk
class with__slots__
for performance, detailed docstrings, and a custom__init__
method.