From 40af32033e6c23403bbff82f75cb28d08f1eee67 Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Wed, 8 Jul 2026 22:17:23 -0700 Subject: [PATCH] textproc/py-semchunk: New port: Python library for splitting text into semantically coherent chunks --- textproc/Makefile | 1 + textproc/py-semchunk/Makefile | 23 +++++++++++++++++++++++ textproc/py-semchunk/distinfo | 3 +++ textproc/py-semchunk/pkg-descr | 4 ++++ 4 files changed, 31 insertions(+) create mode 100644 textproc/py-semchunk/Makefile create mode 100644 textproc/py-semchunk/distinfo create mode 100644 textproc/py-semchunk/pkg-descr diff --git a/textproc/Makefile b/textproc/Makefile index da9dea7a9239..b36e823ae5a2 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1653,6 +1653,7 @@ SUBDIR += py-scour SUBDIR += py-segments SUBDIR += py-segno + SUBDIR += py-semchunk SUBDIR += py-sense2vec SUBDIR += py-sentencepiece SUBDIR += py-simplebayes diff --git a/textproc/py-semchunk/Makefile b/textproc/py-semchunk/Makefile new file mode 100644 index 000000000000..c2b3db78e480 --- /dev/null +++ b/textproc/py-semchunk/Makefile @@ -0,0 +1,23 @@ +PORTNAME= semchunk +DISTVERSION= 4.1.1 +CATEGORIES= textproc python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Python library for splitting text into semantically coherent chunks +WWW= https://github.com/isaacus-dev/semchunk + +LICENSE= MIT + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tqdm>0:misc/py-tqdm@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist concurrent pep517 +NO_ARCH= yes + +post-extract: + @${REINPLACE_CMD} -e 's/^license = "\([^"]*\)"/license = {text = "\1"}/' -e '/^license-files/d' ${WRKSRC}/pyproject.toml + +.include diff --git a/textproc/py-semchunk/distinfo b/textproc/py-semchunk/distinfo new file mode 100644 index 000000000000..608b941540ab --- /dev/null +++ b/textproc/py-semchunk/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1783063884 +SHA256 (semchunk-4.1.1.tar.gz) = f27dc85716a0e9509a3f99c78b961cc476b3120efe711ee9a9a950ed1bd0f8ba +SIZE (semchunk-4.1.1.tar.gz) = 24910 diff --git a/textproc/py-semchunk/pkg-descr b/textproc/py-semchunk/pkg-descr new file mode 100644 index 000000000000..bffa2872bf3b --- /dev/null +++ b/textproc/py-semchunk/pkg-descr @@ -0,0 +1,4 @@ +Semchunk splits text into smaller chunks while preserving as much +local semantic context as possible. It is designed for use in RAG +and LLM applications where text must be divided into segments that +maintain coherent meaning for embedding and retrieval.