cjm-capability-pysbd 0.0.1
“A pySBD-based sentence-segmentation capability for the cjm-substrate runtime — rule-based Golden-Rules sentence boundaries as character spa…”
Registry package lists one maintainerRelease published within seven days
SHA-2567ecac07a5d857e271a10bb18194060483184a93a08494da586c13a5372abbe73
MaleculeMd₂(In₃Pa)
Evidence
1Metadata-Version: 2.4
2Name: cjm-capability-pysbd
3Version: 0.0.1
4Summary: A pySBD-based sentence-segmentation capability for the cjm-substrate runtime — rule-based Golden-Rules sentence boundaries as character spans over the original text.
5Author-email: "Christian J. Mills" <9126128+[email protected]>
6License: Apache- …
11:41… on :: 3
12Classifier: Programming Language :: Python :: 3 :: Only
13Requires-Python: >=3.12
14Description-Content-Type: text/markdown
15License-File: LICENSE
16Requires-Dist: cjm-substrate>=0.0.58
17Requires-Dist: cjm-capability-primitives>=0.0.11
18Requires-Dist: pysbd
19Provides-Extra: test
20Requires-Dist: cjm-sentence-segmenta …
1:58… ng pySBD (Option C; B.5 work item 81e43606)."""
2
3import logging
4from dataclasses import dataclass, field
5from typing import Any, Dict, List, Optional
6
7from cjm_capability_primitives.sentence_segmentation import SentenceSegmentationResult, SentenceSpan
8from cjm_substrate.core.capability import RELOAD_TRIGGER, ToolCapability
9from cjm_substrate.core.errors import CapabilityFatalError, CapabilityInputError
10from cjm_substrate.utils.validation import (config_to_dict, dataclass_to_jsonschema, dict_to_config,
11 SCHEMA_DESC, SCHEMA_TITLE)
12
13# The tool is PURE COMPUTE (PILLAR 1c): `segment_text` runs pySBD's rule-based
14# Golden-Rules segmenter over the caller's original text and builds the typed
15# result. No cache, no storage, no model download — pySBD is pure-pip rules
16# (the DEC cc904eee rationale: built for the abbreviation/initial/title class
17# the decomp sentence-split token heuristic chased across v2/v3).
18
19# pySBD Imports
20try:
21 import pysbd
22 PYSBD_AVAILABLE = True
23except ImportError:
24 PYSBD_AVAILABLE = False
25
⋯6 lines
69:38… ed from the installed distribution (PILLAR 1c)."""
70 from importlib.metadata import metadata, packages_distributions
71 dist = (packages_distributions().get(__package__) or [__package__.replace("_", "-")])[0]
72 return metadata(dist)["Name"]
73
74 @property
75 def version(self) -> str …
76:15… the capability version string."""
77 from cjm_capability_pysbd import __version__
78 return __version__
79
80 def get_current_config(self) -> Dict[str, Any]: # Current conf …
No evidence locations were recorded for this file. Raw result