chunklet-py 2.3.0__tar.gz → 2.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {chunklet_py-2.3.0/src/chunklet_py.egg-info → chunklet_py-2.3.1}/PKG-INFO +3 -3
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/pyproject.toml +4 -4
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/_plain_text_chunker.py +1 -1
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/document_chunker.py +2 -2
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/sentence_splitter/_universal_splitter.py +5 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1/src/chunklet_py.egg-info}/PKG-INFO +3 -3
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet_py.egg-info/requires.txt +2 -2
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/LICENSE +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/README.md +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/setup.cfg +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/__init__.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/base_chunker.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/cli.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/code_chunker/__init__.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/code_chunker/_code_structure_extractor.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/code_chunker/code_chunker.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/code_chunker/patterns.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/code_chunker/utils.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/common/__init__.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/common/batch_runner.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/common/deprecation.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/common/logging_utils.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/common/path_utils.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/common/token_utils.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/common/validation.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/__init__.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/converters/__init__.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/converters/html_2_md.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/converters/latex_2_md.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/converters/rst_2_md.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/converters/table_2_md.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/processors/__init__.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/processors/base_processor.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/processors/docx_processor.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/processors/epub_processor.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/processors/odt_processor.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/processors/pdf_processor.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/registry.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/span_finder.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/exceptions.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/sentence_splitter/__init__.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/sentence_splitter/languages.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/sentence_splitter/registry.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/sentence_splitter/sentence_splitter.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/sentence_splitter/terminators.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/visualizer/__init__.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/visualizer/static/css/style.css +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/visualizer/static/index.html +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/visualizer/static/js/app.js +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/visualizer/static/js/utils.js +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/visualizer/visualizer.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet_py.egg-info/SOURCES.txt +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet_py.egg-info/dependency_links.txt +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet_py.egg-info/entry_points.txt +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet_py.egg-info/top_level.txt +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/tests/test_code_chunking.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/tests/test_document_chunking.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/tests/test_plain_text_chunking.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/tests/test_sentence_splitting.py +0 -0
- {chunklet_py-2.3.0 → chunklet_py-2.3.1}/tests/test_visualization.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chunklet-py
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: High-fidelity context-aware chunking and interactive visualization for RAG. Advanced segmentation for code and documents, because your LLM is only as smart as the fragments you feed it.
|
|
5
5
|
Author-email: speedyk_005 <speedy40115719@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -28,8 +28,8 @@ License-File: LICENSE
|
|
|
28
28
|
Requires-Dist: loguru<1.0,>=0.7.3
|
|
29
29
|
Requires-Dist: pysbd<1.0,>=0.3.4
|
|
30
30
|
Requires-Dist: sentsplit<2.0,>=1.0.8
|
|
31
|
-
Requires-Dist: sentencex
|
|
32
|
-
Requires-Dist: sentencex
|
|
31
|
+
Requires-Dist: sentencex<=0.6.1; sys_platform == "linux" and (platform_machine == "aarch64" or platform_machine == "armv7l")
|
|
32
|
+
Requires-Dist: sentencex<2.0,>=1.0.0; sys_platform != "linux" or (platform_machine != "aarch64" and platform_machine != "armv7l")
|
|
33
33
|
Requires-Dist: indic-nlp-library<1.0,>=0.92
|
|
34
34
|
Requires-Dist: py3langid<1.0,>=0.3.0
|
|
35
35
|
Requires-Dist: mpire<3.0,>=2.10.2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "chunklet-py"
|
|
3
|
-
version = "2.3.
|
|
3
|
+
version = "2.3.1"
|
|
4
4
|
description = "High-fidelity context-aware chunking and interactive visualization for RAG. Advanced segmentation for code and documents, because your LLM is only as smart as the fragments you feed it."
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "speedyk_005", email = "speedy40115719@gmail.com" }
|
|
@@ -38,9 +38,9 @@ dependencies = [
|
|
|
38
38
|
"pysbd>=0.3.4,<1.0",
|
|
39
39
|
"sentsplit>=1.0.8,<2.0",
|
|
40
40
|
|
|
41
|
-
# Rust binding (1.0+) for faster performance on supported platforms, legacy for Android.
|
|
42
|
-
"sentencex
|
|
43
|
-
"sentencex
|
|
41
|
+
# Rust binding (1.0+) for faster performance on supported platforms, legacy for Android temporarily.
|
|
42
|
+
"sentencex<=0.6.1; sys_platform == 'linux' and (platform_machine == 'aarch64' or platform_machine == 'armv7l')",
|
|
43
|
+
"sentencex>=1.0.0,<2.0; sys_platform != 'linux' or (platform_machine != 'aarch64' and platform_machine != 'armv7l')",
|
|
44
44
|
|
|
45
45
|
"indic-nlp-library>=0.92,<1.0",
|
|
46
46
|
"py3langid>=0.3.0,<1.0",
|
{chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/_plain_text_chunker.py
RENAMED
|
@@ -120,7 +120,7 @@ class PlainTextChunker:
|
|
|
120
120
|
"""
|
|
121
121
|
chunks_out = []
|
|
122
122
|
for i, chunk_str in enumerate(chunks, start=1):
|
|
123
|
-
chunk = DotDict()
|
|
123
|
+
chunk = DotDict({})
|
|
124
124
|
chunk.content = chunk_str.strip()
|
|
125
125
|
chunk.metadata = copy.deepcopy(base_metadata)
|
|
126
126
|
chunk.metadata["chunk_num"] = i
|
|
@@ -607,7 +607,7 @@ class DocumentChunker(BaseChunker):
|
|
|
607
607
|
sections_per_path[curr_path] -= 1
|
|
608
608
|
|
|
609
609
|
@deprecated_callable(
|
|
610
|
-
use_instead="chunk_file", deprecated_in="2.2.0", removed_in="3.0.0"
|
|
610
|
+
use_instead="chunk_file or chunk_text", deprecated_in="2.2.0", removed_in="3.0.0"
|
|
611
611
|
)
|
|
612
612
|
def chunk( # pragma: no cover
|
|
613
613
|
self,
|
|
@@ -632,7 +632,7 @@ class DocumentChunker(BaseChunker):
|
|
|
632
632
|
return self.chunk_file(**params)
|
|
633
633
|
|
|
634
634
|
@deprecated_callable(
|
|
635
|
-
use_instead="chunk_files", deprecated_in="2.2.0", removed_in="3.0.0"
|
|
635
|
+
use_instead="chunk_files or chunk_texts", deprecated_in="2.2.0", removed_in="3.0.0"
|
|
636
636
|
)
|
|
637
637
|
def batch_chunk( # pragma: no cover
|
|
638
638
|
self,
|
{chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/sentence_splitter/_universal_splitter.py
RENAMED
|
@@ -36,6 +36,11 @@ class UniversalSplitter:
|
|
|
36
36
|
self.numbered_list_pattern = re.compile(r"[\n:]\s*\p{N}\.")
|
|
37
37
|
|
|
38
38
|
# Core sentence split regex
|
|
39
|
+
# NOTE: Acronyms like "U.S.A" are protected primarily by the lookahead (?=\s+...).
|
|
40
|
+
# Since "U.S.A," has no space after it (just punctuation), the lookahead fails
|
|
41
|
+
# and no split occurs. The negative lookbehind handles other abbreviations like "Dr."
|
|
42
|
+
# This means acronym protection is *not* dependent on masking—it's explicit in the
|
|
43
|
+
# lookahead requirement for whitespace or newline before the next uppercase letter.
|
|
39
44
|
self.sentence_end_pattern = re.compile(
|
|
40
45
|
rf"""
|
|
41
46
|
(?<!\b(\p{{Lu}}\p{{Ll}}{{1, 4}}\.)*) # Latin-only abbreviation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chunklet-py
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: High-fidelity context-aware chunking and interactive visualization for RAG. Advanced segmentation for code and documents, because your LLM is only as smart as the fragments you feed it.
|
|
5
5
|
Author-email: speedyk_005 <speedy40115719@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -28,8 +28,8 @@ License-File: LICENSE
|
|
|
28
28
|
Requires-Dist: loguru<1.0,>=0.7.3
|
|
29
29
|
Requires-Dist: pysbd<1.0,>=0.3.4
|
|
30
30
|
Requires-Dist: sentsplit<2.0,>=1.0.8
|
|
31
|
-
Requires-Dist: sentencex
|
|
32
|
-
Requires-Dist: sentencex
|
|
31
|
+
Requires-Dist: sentencex<=0.6.1; sys_platform == "linux" and (platform_machine == "aarch64" or platform_machine == "armv7l")
|
|
32
|
+
Requires-Dist: sentencex<2.0,>=1.0.0; sys_platform != "linux" or (platform_machine != "aarch64" and platform_machine != "armv7l")
|
|
33
33
|
Requires-Dist: indic-nlp-library<1.0,>=0.92
|
|
34
34
|
Requires-Dist: py3langid<1.0,>=0.3.0
|
|
35
35
|
Requires-Dist: mpire<3.0,>=2.10.2
|
|
@@ -12,10 +12,10 @@ typer<1.0,>=0.19.0
|
|
|
12
12
|
charset-normalizer<4.0,>=3.4.2
|
|
13
13
|
setuptools<81
|
|
14
14
|
|
|
15
|
-
[:
|
|
15
|
+
[:sys_platform != "linux" or (platform_machine != "aarch64" and platform_machine != "armv7l")]
|
|
16
16
|
sentencex<2.0,>=1.0.0
|
|
17
17
|
|
|
18
|
-
[:
|
|
18
|
+
[:sys_platform == "linux" and (platform_machine == "aarch64" or platform_machine == "armv7l")]
|
|
19
19
|
sentencex<=0.6.1
|
|
20
20
|
|
|
21
21
|
[all]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/code_chunker/_code_structure_extractor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/converters/__init__.py
RENAMED
|
File without changes
|
{chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/converters/html_2_md.py
RENAMED
|
File without changes
|
{chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/converters/latex_2_md.py
RENAMED
|
File without changes
|
{chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/converters/rst_2_md.py
RENAMED
|
File without changes
|
{chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/converters/table_2_md.py
RENAMED
|
File without changes
|
{chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/processors/__init__.py
RENAMED
|
File without changes
|
{chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/processors/base_processor.py
RENAMED
|
File without changes
|
{chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/processors/docx_processor.py
RENAMED
|
File without changes
|
{chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/processors/epub_processor.py
RENAMED
|
File without changes
|
{chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/processors/odt_processor.py
RENAMED
|
File without changes
|
{chunklet_py-2.3.0 → chunklet_py-2.3.1}/src/chunklet/document_chunker/processors/pdf_processor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|