lede 0.3.0__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.
- lede-0.3.0/.gitignore +53 -0
- lede-0.3.0/CHANGELOG.md +327 -0
- lede-0.3.0/LICENSE +202 -0
- lede-0.3.0/PKG-INFO +505 -0
- lede-0.3.0/README.md +272 -0
- lede-0.3.0/benchmarks/README.md +66 -0
- lede-0.3.0/examples/README.md +35 -0
- lede-0.3.0/fixtures/README.md +69 -0
- lede-0.3.0/fixtures/tfidf-legacy/README.md +6 -0
- lede-0.3.0/packages/lede-spacy/LICENSE +202 -0
- lede-0.3.0/packages/lede-spacy/README.md +201 -0
- lede-0.3.0/packages/lede-spacy/pyproject.toml +51 -0
- lede-0.3.0/packages/lede-spacy/tests/test_spacy_backend.py +196 -0
- lede-0.3.0/pyproject.toml +59 -0
- lede-0.3.0/rust/tests/brief.rs +120 -0
- lede-0.3.0/rust/tests/clean_text.rs +41 -0
- lede-0.3.0/rust/tests/cli.rs +110 -0
- lede-0.3.0/rust/tests/coverage.rs +57 -0
- lede-0.3.0/rust/tests/determinism.rs +85 -0
- lede-0.3.0/rust/tests/extract_correlate.rs +87 -0
- lede-0.3.0/rust/tests/extract_key_facts.rs +85 -0
- lede-0.3.0/rust/tests/extract_metadata.rs +40 -0
- lede-0.3.0/rust/tests/extract_outline.rs +163 -0
- lede-0.3.0/rust/tests/extract_phrases.rs +67 -0
- lede-0.3.0/rust/tests/extract_stats.rs +269 -0
- lede-0.3.0/rust/tests/extract_toc.rs +35 -0
- lede-0.3.0/rust/tests/fixtures.rs +229 -0
- lede-0.3.0/rust/tests/float_parity.rs +41 -0
- lede-0.3.0/rust/tests/keyword.rs +82 -0
- lede-0.3.0/rust/tests/scorer_v0_2.rs +72 -0
- lede-0.3.0/rust/tests/sentences.rs +86 -0
- lede-0.3.0/rust/tests/strip_think.rs +33 -0
- lede-0.3.0/rust/tests/summaryresult.rs +52 -0
- lede-0.3.0/rust/tests/tfidf.rs +104 -0
- lede-0.3.0/rust/tests/zero_dep.rs +81 -0
- lede-0.3.0/src/lede/__init__.py +28 -0
- lede-0.3.0/src/lede/_headings.py +111 -0
- lede-0.3.0/src/lede/_parity.py +73 -0
- lede-0.3.0/src/lede/_types.py +47 -0
- lede-0.3.0/src/lede/brief.py +157 -0
- lede-0.3.0/src/lede/clean.py +100 -0
- lede-0.3.0/src/lede/cli.py +84 -0
- lede-0.3.0/src/lede/coverage.py +108 -0
- lede-0.3.0/src/lede/extract/__init__.py +37 -0
- lede-0.3.0/src/lede/extract/_backends.py +69 -0
- lede-0.3.0/src/lede/extract/_common.py +20 -0
- lede-0.3.0/src/lede/extract/_yake.py +78 -0
- lede-0.3.0/src/lede/extract/correlate.py +117 -0
- lede-0.3.0/src/lede/extract/key_facts.py +135 -0
- lede-0.3.0/src/lede/extract/metadata.py +78 -0
- lede-0.3.0/src/lede/extract/outline.py +97 -0
- lede-0.3.0/src/lede/extract/phrases.py +121 -0
- lede-0.3.0/src/lede/extract/stats.py +412 -0
- lede-0.3.0/src/lede/keyword.py +79 -0
- lede-0.3.0/src/lede/sentences.py +78 -0
- lede-0.3.0/src/lede/textrank.py +75 -0
- lede-0.3.0/src/lede/tfidf.py +406 -0
- lede-0.3.0/tests/__init__.py +0 -0
- lede-0.3.0/tests/test_brief.py +105 -0
- lede-0.3.0/tests/test_clean.py +86 -0
- lede-0.3.0/tests/test_cli.py +75 -0
- lede-0.3.0/tests/test_determinism.py +62 -0
- lede-0.3.0/tests/test_edge_cases.py +104 -0
- lede-0.3.0/tests/test_extract_backends.py +94 -0
- lede-0.3.0/tests/test_extract_correlate.py +58 -0
- lede-0.3.0/tests/test_extract_key_facts.py +68 -0
- lede-0.3.0/tests/test_extract_metadata.py +38 -0
- lede-0.3.0/tests/test_extract_outline.py +119 -0
- lede-0.3.0/tests/test_extract_phrases.py +108 -0
- lede-0.3.0/tests/test_extract_stats.py +216 -0
- lede-0.3.0/tests/test_extract_toc.py +23 -0
- lede-0.3.0/tests/test_fixtures.py +72 -0
- lede-0.3.0/tests/test_keyword.py +65 -0
- lede-0.3.0/tests/test_sentences.py +63 -0
- lede-0.3.0/tests/test_textrank.py +35 -0
- lede-0.3.0/tests/test_tfidf.py +122 -0
- lede-0.3.0/tests/test_v0_2_coverage.py +48 -0
- lede-0.3.0/tests/test_v0_2_scorer.py +94 -0
- lede-0.3.0/tests/test_v0_2_summaryresult.py +94 -0
- lede-0.3.0/tests/test_zero_deps.py +58 -0
lede-0.3.0/.gitignore
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
.coverage
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
.venv/
|
|
10
|
+
venv/
|
|
11
|
+
|
|
12
|
+
# IDE
|
|
13
|
+
.vscode/
|
|
14
|
+
.idea/
|
|
15
|
+
|
|
16
|
+
# Per-developer agent / tooling config (Claude Code, etc.)
|
|
17
|
+
# These files often contain machine-local paths and per-machine permission
|
|
18
|
+
# allowlists that should not be shared.
|
|
19
|
+
.claude/
|
|
20
|
+
!.claude/agents/
|
|
21
|
+
!.claude/commands/
|
|
22
|
+
|
|
23
|
+
# Skill output (research/audit artifacts — point-in-time, not source).
|
|
24
|
+
# Per the skill-output-hygiene rule. Never commit these to a public repo.
|
|
25
|
+
skill-output/
|
|
26
|
+
|
|
27
|
+
# Secrets — defensive, even though none exist today
|
|
28
|
+
.env
|
|
29
|
+
.env.*
|
|
30
|
+
!.env.example
|
|
31
|
+
.openai
|
|
32
|
+
.openai.*
|
|
33
|
+
.anthropic
|
|
34
|
+
.anthropic.*
|
|
35
|
+
*.pem
|
|
36
|
+
*.key
|
|
37
|
+
*.p12
|
|
38
|
+
*.pfx
|
|
39
|
+
*.jks
|
|
40
|
+
id_rsa
|
|
41
|
+
id_ed25519
|
|
42
|
+
credentials*.json
|
|
43
|
+
secrets*.json
|
|
44
|
+
|
|
45
|
+
# Terraform / IaC state
|
|
46
|
+
*.tfstate
|
|
47
|
+
*.tfstate.*
|
|
48
|
+
*.tfvars
|
|
49
|
+
!*.tfvars.example
|
|
50
|
+
|
|
51
|
+
# OS cruft
|
|
52
|
+
.DS_Store
|
|
53
|
+
Thumbs.db
|
lede-0.3.0/CHANGELOG.md
ADDED
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
lede's release notes. Tag annotations on each `vX.Y.Z` git tag are the
|
|
4
|
+
canonical record; this file is a human-readable summary in one place.
|
|
5
|
+
|
|
6
|
+
Entries below `## [0.2.2]` reference the project under its previous name,
|
|
7
|
+
`skimr`. The v0.0.1 / v0.2.0 / v0.2.1 / v0.2.2 git tags + GitHub Releases
|
|
8
|
+
remain as `skimr` releases — they were real shipped artifacts under that
|
|
9
|
+
name. See the v0.3.0 entry for the rename rationale.
|
|
10
|
+
|
|
11
|
+
## [0.3.0] — 2026-04-28
|
|
12
|
+
|
|
13
|
+
**Renamed: `skimr` → `lede`.** No behavior, fixture, or output changes;
|
|
14
|
+
this is a wholesale rename to avoid namespace conflict with the
|
|
15
|
+
well-known `skimr` R package. New install / import:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install lede
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
from lede import summarize
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Companion package: `skimr-spacy` → `lede-spacy`, module
|
|
26
|
+
`skimr_spacy` → `lede_spacy`. Rust crate: `skimr` → `lede`. Repo:
|
|
27
|
+
`yonk-labs/skimr` → `yonk-labs/lede` (GitHub auto-redirects the old
|
|
28
|
+
URL).
|
|
29
|
+
|
|
30
|
+
The historical `v0.2.x` `skimr` tags + GitHub Releases stay as-is for
|
|
31
|
+
archaeology — they were real releases, just under the old name.
|
|
32
|
+
|
|
33
|
+
### Migration
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Python
|
|
37
|
+
pip uninstall skimr skimr-spacy
|
|
38
|
+
pip install lede # or: pip install lede[wordforms,yake,textrank]
|
|
39
|
+
pip install lede-spacy # if you used the spaCy companion
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```diff
|
|
43
|
+
- from skimr import summarize, brief, clean_text, strip_think, extract_keyword
|
|
44
|
+
+ from lede import summarize, brief, clean_text, strip_think, extract_keyword
|
|
45
|
+
|
|
46
|
+
- from skimr.extract import stats, outline, metadata, phrases, correlate_facts
|
|
47
|
+
+ from lede.extract import stats, outline, metadata, phrases, correlate_facts
|
|
48
|
+
|
|
49
|
+
- import skimr_spacy
|
|
50
|
+
+ import lede_spacy
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```toml
|
|
54
|
+
# Rust Cargo.toml
|
|
55
|
+
- skimr = { version = "0.2.2" }
|
|
56
|
+
+ lede = { version = "0.3.0" }
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
```rust
|
|
60
|
+
- use skimr::{summarize, Mode};
|
|
61
|
+
+ use lede::{summarize, Mode};
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Other than the rename, identical to v0.2.2.
|
|
65
|
+
|
|
66
|
+
## [0.2.2] — 2026-04-27
|
|
67
|
+
|
|
68
|
+
**Docs-only patch.** No code changes; behavior, fixtures, and public
|
|
69
|
+
API unchanged from `v0.2.1`. This release rolls up the documentation
|
|
70
|
+
work that landed between the `v0.2.1` tag and the public-flip click,
|
|
71
|
+
plus the prod-ready audit's day-1 paper cuts.
|
|
72
|
+
|
|
73
|
+
### Added
|
|
74
|
+
- **`docs/guide.md`** — user-facing tutorial. 9 lessons walking through
|
|
75
|
+
every feature with actual outputs and "change this knob, see what
|
|
76
|
+
happens" prompts. Each lesson tags whether the snippet is byte-
|
|
77
|
+
identical in Rust or Python-only with rationale.
|
|
78
|
+
- **`docs/REFERENCE.md` § Runtime parity** — explicit per-feature
|
|
79
|
+
Python vs Rust availability matrix. Calls out which Python-only
|
|
80
|
+
features (`textrank`, `yake`, spaCy NER) are feasible-to-port-but-
|
|
81
|
+
not-yet vs which are deliberately Python-only by contract.
|
|
82
|
+
- **`packages/skimr-spacy/README.md` rewrite** — user-facing pitch
|
|
83
|
+
with a real side-by-side example: same input through `backend="regex"`
|
|
84
|
+
(returns `entities=()`) and `backend="spacy"` (returns 11 entities).
|
|
85
|
+
Performance numbers measured locally. Decision criteria (when to
|
|
86
|
+
use, when not to) called out explicitly.
|
|
87
|
+
- `SECURITY.md` § "Known transitive dependency notes" — documents the
|
|
88
|
+
`rand 0.7.3` `unsound` advisory (RUSTSEC-2026-0097) that surfaces
|
|
89
|
+
under `cargo audit` when the `wordforms` cargo feature is enabled.
|
|
90
|
+
Practical exposure on the `wordforms` path is effectively zero
|
|
91
|
+
(skimr ships no custom logger); documented per public-OSS hygiene.
|
|
92
|
+
|
|
93
|
+
### Fixed (paper cuts from the v0.2.1 prod-ready audit)
|
|
94
|
+
- `CONTRIBUTING.md` and `CLAUDE.md` cited stale test counts (181 / 116);
|
|
95
|
+
updated to soft `~230` / `~120` so future test additions don't
|
|
96
|
+
require an immediate doc edit.
|
|
97
|
+
- `CLAUDE.md` Status block: `v0.2.0 shipped 2026-04-26` →
|
|
98
|
+
`v0.2.1 shipped 2026-04-27`.
|
|
99
|
+
- `README.md` Apollo-example timing claim (`Time: 0.16 ms`) was
|
|
100
|
+
ambiguous about which runtime; now reads `~0.15 ms (Python, p50 of
|
|
101
|
+
50 runs on this paragraph)` with the cross-corpus p50 (Python 0.42
|
|
102
|
+
ms, Rust 0.13 ms) cited for context. Same treatment on the
|
|
103
|
+
`attach=` timing.
|
|
104
|
+
- `.github/workflows/test.yml` `pip-audit --ignore-vuln GHSA-rrqc-c2jx-6jgv`
|
|
105
|
+
flag dropped — the suppression had no comment and the advisory was
|
|
106
|
+
no longer flagged by `pip-audit --strict` anyway. Replaced with an
|
|
107
|
+
inline comment explaining the warn-only triage policy and how to
|
|
108
|
+
add a properly-documented suppression in the future.
|
|
109
|
+
|
|
110
|
+
## [0.2.1] — 2026-04-27
|
|
111
|
+
|
|
112
|
+
**Patch release — public-flip readiness.** No new API surface; this is
|
|
113
|
+
a quality, robustness, and presentation pass on top of v0.2.0.
|
|
114
|
+
External callers of `summarize()` / `brief()` / `skimr.extract.*` see
|
|
115
|
+
the same shapes; existing fixture bytes are preserved. The v0.2 design
|
|
116
|
+
contract is unchanged.
|
|
117
|
+
|
|
118
|
+
### Fixed (real bugs)
|
|
119
|
+
- **ReDoS in `extract.stats`** — Python `re` engine took **224 s** on a
|
|
120
|
+
50 K-digit input followed by a near-unit keyword. Numeric quantifiers
|
|
121
|
+
bounded to `\d{1,15}` and sentences with 20+ digit unbroken runs
|
|
122
|
+
skipped. Now **1.5 ms** on the same input. Mirrored in Rust for
|
|
123
|
+
parity. Two new regression tests in each language.
|
|
124
|
+
- **Rust `extract::stats::ctx()` UTF-8 panic and Python ↔ Rust drift** —
|
|
125
|
+
the ±25-char context window was 25 *bytes* in Rust vs 25 *chars* in
|
|
126
|
+
Python. Em-dashes / accented Latin / emoji adjacent to a stat token
|
|
127
|
+
pushed the two outputs 2+ bytes apart and could panic Rust on a
|
|
128
|
+
multi-byte boundary. Now char-counted on both sides; the new
|
|
129
|
+
per-fixture parity walker enforces this.
|
|
130
|
+
- **Python CLI mojibake on non-UTF-8 locales** — `Path.read_text()`
|
|
131
|
+
picked up the OS default encoding (cp1252 on Windows). Forced
|
|
132
|
+
UTF-8 for both file and stdin reads; restores parity with the
|
|
133
|
+
Rust CLI.
|
|
134
|
+
- **Rust CLI swallowed stdout write errors** — `let _ =` ate
|
|
135
|
+
`BrokenPipe` and other I/O errors. Now `BrokenPipe` (user piped
|
|
136
|
+
into `head`) returns 0; other errors propagate to non-zero exit.
|
|
137
|
+
- **Sentence splitter NUL panic** — Rust used `assert!` on the
|
|
138
|
+
internal sentinel byte; PDF-extracted text and ETL outputs can
|
|
139
|
+
contain NULs. Now silently stripped in both languages.
|
|
140
|
+
- **Sentence splitter "no." handling** — the unconditional `"no"`
|
|
141
|
+
abbreviation merged "He said no. Then he left." into one sentence.
|
|
142
|
+
Now context-sensitive: `"No. 5"` is protected; bare `"no."` is not.
|
|
143
|
+
- **Coverage paragraph mapping** — substring-based "first containing
|
|
144
|
+
paragraph wins" biased coverage on docs with template/FAQ-style
|
|
145
|
+
repeated sentences. Now occurrence-counted: K-th occurrence → K-th
|
|
146
|
+
matching paragraph.
|
|
147
|
+
- **Coverage join separator** — was `"\n"` while default and legacy
|
|
148
|
+
modes used `" "`. Now `" "` in all three for byte-stability across
|
|
149
|
+
modes.
|
|
150
|
+
- **`extract_keyword` empty-keys footgun** — silent `LEFT(text, 2000)`
|
|
151
|
+
chop is gone; empty/all-filtered keywords now return `""` in both
|
|
152
|
+
languages.
|
|
153
|
+
- **`metadata.dates` bare-years claim** — `extract.metadata` regex
|
|
154
|
+
now matches `(?:19|20)\d{2}` years to match the doc and parallel
|
|
155
|
+
`extract.stats._DATE_RE`.
|
|
156
|
+
- **Four `.expect("no NaN")` panic sites in Rust** — replaced with
|
|
157
|
+
`.unwrap_or(Ordering::Equal)`. NaN in pipeline scores now degrades
|
|
158
|
+
to deterministic Equal rather than panicking the worker.
|
|
159
|
+
- **Rust 1.93 `clippy::cast_sign_loss` regression in `brief.rs`** —
|
|
160
|
+
allow-listed with a justification comment; the cast is provably
|
|
161
|
+
non-negative.
|
|
162
|
+
|
|
163
|
+
### Added
|
|
164
|
+
- **Per-fixture v0.2 parity walker** — 70 fixtures (7 primitives × 10
|
|
165
|
+
corpora) byte-identical between Python and Rust. Enforces SC-C on
|
|
166
|
+
the v0.2 differentiator surface, not just the v0.1 four-function
|
|
167
|
+
contract. Caught the `ctx()` char-vs-byte drift above.
|
|
168
|
+
- **Edge-case fixtures** (`fixtures/edge_cases/`) — multibyte UTF-8,
|
|
169
|
+
CP1252 smart quotes, 50K-digit ReDoS bait, ~1 MB document. 50
|
|
170
|
+
parametrized tests across 10 primitives × 5 fixtures.
|
|
171
|
+
- **CI matrix expansion** — `tests` workflow installs `[dev,textrank,
|
|
172
|
+
wordforms,yake]` and verifies each extra path. New `skimr-spacy`
|
|
173
|
+
workflow runs the 17 companion-package tests + downloads the
|
|
174
|
+
`en_core_web_sm` model. Both `cargo audit` and `pip-audit` run on
|
|
175
|
+
every push (warn-only on findings).
|
|
176
|
+
- **`brief()` explicit `convert_word_names` kwarg** — Python and Rust
|
|
177
|
+
now accept an explicit override (`None` = auto-detect for
|
|
178
|
+
back-compat; `True` / `False` locks parity across runtimes
|
|
179
|
+
regardless of which extras are installed).
|
|
180
|
+
- **`docs/comparison.md`** — worked side-by-side examples of skimr
|
|
181
|
+
vs Sumy LexRank/TextRank/LSA vs LLM API on real corpora, with
|
|
182
|
+
measured timings from the benchmark suite.
|
|
183
|
+
- **`docs/v0-2-design.md` + `docs/skimr-spacy-integration.md`** —
|
|
184
|
+
promoted from buried `docs/superpowers/specs/` paths. Same content,
|
|
185
|
+
cleaner public-facing location.
|
|
186
|
+
- **Status badges in README** — 4 CI workflow badges + release +
|
|
187
|
+
license + Python 3.10+ + Rust 1.85+.
|
|
188
|
+
- **Plain-language README opening + Apollo 11 quick example** —
|
|
189
|
+
replaces the academic "deterministic, zero-dependency
|
|
190
|
+
text-shrinker" framing with a concrete demonstration.
|
|
191
|
+
- **`MAINTAINERS.md`** — single-maintainer disclosure with bus-factor
|
|
192
|
+
honesty + decision authority + release cadence.
|
|
193
|
+
- **`SECURITY.md`** — private report path + threat model scope.
|
|
194
|
+
- **`CONTRIBUTING.md`** — quick-start + parity contract + style
|
|
195
|
+
notes + CI overview.
|
|
196
|
+
- **`examples/` directory** — 7 runnable scripts covering quickstart,
|
|
197
|
+
the `attach=` RAG-prep API, `brief()`, each extract primitive
|
|
198
|
+
standalone, paragraph-chunked pipeline for long docs, the
|
|
199
|
+
`skimr-spacy` companion, and the `[wordforms]` extra. CI smoke-runs
|
|
200
|
+
the no-extras-needed ones on every push.
|
|
201
|
+
- **Heading-pattern shared helper** — heading regexes live in
|
|
202
|
+
`_headings.{py,rs}` only; previously-duplicated 70-line copies in
|
|
203
|
+
`extract/outline.{py,rs}` deleted.
|
|
204
|
+
- **Scaling notes in `docs/REFERENCE.md`** — typical-document p50
|
|
205
|
+
table, large-document warnings, recommended chunking pattern for
|
|
206
|
+
>100 KB inputs.
|
|
207
|
+
- **GitHub Release object** for `v0.2.0`.
|
|
208
|
+
|
|
209
|
+
### Changed
|
|
210
|
+
- **`networkx` pin** — `networkx>=3.0,<3.5` because `skimr.textrank`
|
|
211
|
+
uses `_pagerank_python` (private API; underscore prefix). Drop the
|
|
212
|
+
upper bound when textrank is rewritten against the public API.
|
|
213
|
+
- **`pyproject.toml` Development Status classifier** —
|
|
214
|
+
`3 - Alpha` → `4 - Beta`. 427 tests, tagged release, CI green is
|
|
215
|
+
past alpha.
|
|
216
|
+
|
|
217
|
+
### Removed (transient or pre-skimr)
|
|
218
|
+
- `docs/RESUME.md` — agent session-state.
|
|
219
|
+
- `skill-output/` — research, audit, and session artifacts; now
|
|
220
|
+
gitignored.
|
|
221
|
+
- `summarize-output.py` — original Python prototype, predates skimr.
|
|
222
|
+
- `extractive-performance.md` — pre-skimr benchmark notes (superseded
|
|
223
|
+
by `benchmarks/quality/matrix-2026-04-26.md`).
|
|
224
|
+
- `SUMMARIZATION.md`, `extractive_functions.{sql,md}` — original
|
|
225
|
+
algorithmic spec and PL/pgSQL reference. Provenance comments in
|
|
226
|
+
source updated to describe the algorithm directly without name-
|
|
227
|
+
checking the now-removed files.
|
|
228
|
+
- `docs/upstream-context-yonk-taskstash.md` — wrong project's context.
|
|
229
|
+
- `docs/superpowers/plans/` — executed implementation plans.
|
|
230
|
+
|
|
231
|
+
## [0.2.0] — 2026-04-26
|
|
232
|
+
|
|
233
|
+
**v0.2 is the RAG-prep primitive.** A single `summarize(attach=…)` call
|
|
234
|
+
now returns a summary plus structured stats / outline / metadata /
|
|
235
|
+
phrases / correlated-facts in sub-5 ms. New top-level `brief()` composes
|
|
236
|
+
a paste-ready overview. The `skimr.extract.*` namespace exposes every
|
|
237
|
+
primitive standalone.
|
|
238
|
+
|
|
239
|
+
### Added
|
|
240
|
+
- `summarize(text, max_length, *, mode="default", attach=…)` — returns
|
|
241
|
+
`SummaryResult` with `.summary` plus optional structured enrichments.
|
|
242
|
+
`str(r)` and `f"{r}"` still evaluate to the summary string for
|
|
243
|
+
legacy callers.
|
|
244
|
+
- `Mode::Default` (Rust) / `mode="default"` (Python) — TF-IDF + position
|
|
245
|
+
+ length composite plus C1 scorer tweaks (heading filter, cue-phrase
|
|
246
|
+
boost, digit bonus, section-position weight).
|
|
247
|
+
- `Mode::Coverage` / `mode="coverage"` — paragraph-aware coverage
|
|
248
|
+
selection that tries to land at least one sentence per paragraph
|
|
249
|
+
before greedy-filling.
|
|
250
|
+
- `Mode::Legacy` / `mode="legacy"` — preserves v0.0.1 60/25/15 bytes.
|
|
251
|
+
- `skimr.brief(text, *, format="string"|"markdown"|"dict")` — composes
|
|
252
|
+
summarize + key_facts + toc.
|
|
253
|
+
- `skimr.extract.outline(text)` — section headings + key sentence.
|
|
254
|
+
- `skimr.extract.toc(text)` — section names only.
|
|
255
|
+
- `skimr.extract.stats(text, *, convert_word_names=False)` — numeric
|
|
256
|
+
facts (money, percent, date, duration, count) with sentence context.
|
|
257
|
+
- `skimr.extract.key_facts(text, *, max_facts=10)` — sentences ranked
|
|
258
|
+
by stat density.
|
|
259
|
+
- `skimr.extract.metadata(text, *, backend=None)` — dates, amounts,
|
|
260
|
+
URLs, entities (entities require the spaCy backend).
|
|
261
|
+
- `skimr.extract.phrases(text, keywords=None)` — repeated multi-word
|
|
262
|
+
n-grams (with `backend="yake"` available behind the `[yake]` extra).
|
|
263
|
+
- `skimr.extract.correlate_facts(text, *, backend=None)` — entity ↔
|
|
264
|
+
number/polarity pairings.
|
|
265
|
+
- Optional `[wordforms]` extra (Python) and `wordforms` cargo feature
|
|
266
|
+
(Rust) — both bind to the `text2num` crate so spelled-out numbers
|
|
267
|
+
("five thousand documents") surface as Stats with byte-identical
|
|
268
|
+
output across runtimes.
|
|
269
|
+
- Optional `[yake]` extra — registers a YAKE backend for `phrases()`
|
|
270
|
+
(Python only).
|
|
271
|
+
- Companion package `skimr-spacy` — provides spaCy-backed `entities`,
|
|
272
|
+
`metadata`, `phrases`, and `correlate_facts` backends. Imports
|
|
273
|
+
register themselves via `skimr.extract._backends`. Rust does not
|
|
274
|
+
ship NER by design.
|
|
275
|
+
|
|
276
|
+
### Performance
|
|
277
|
+
- `summarize` core path: 0.42 ms p50 (Python) / 0.13 ms p50 (Rust),
|
|
278
|
+
measured on the 10-corpus benchmark. Sumy LexRank/TextRank/LSA
|
|
279
|
+
backends sit at 11–12 ms p50.
|
|
280
|
+
- `summarize(attach=[…all 5…])`: 2.40 ms p50 worst case 3.80 ms across
|
|
281
|
+
10 corpora — still ~5× faster than any sumy backend while producing
|
|
282
|
+
structured output sumy doesn't.
|
|
283
|
+
- See `benchmarks/quality/matrix-2026-04-26.md` for the method × corpus
|
|
284
|
+
× time × enrichments grid.
|
|
285
|
+
|
|
286
|
+
### Quality
|
|
287
|
+
- SC-A (rubric) — `skimr/tfidf-v0.2` ranks #1 on the A1 5-dimension
|
|
288
|
+
rubric and on the A4 cross-family Qwen judge across 10 corpora.
|
|
289
|
+
Beats `sumy/TextRank` on both signals. See
|
|
290
|
+
`benchmarks/quality/review-2026-04-21.md`.
|
|
291
|
+
- SC-D (extraction quality) — 3 of 5 primitives pass the gate
|
|
292
|
+
(`stats`, `outline`, `metadata`) at recall ≥ 0.85, precision ≥ 0.80
|
|
293
|
+
under the format-tolerant match rule. `phrases` (R 0.478) and
|
|
294
|
+
`correlate_facts` (P 0.25) ship below the gate by design — the gold
|
|
295
|
+
fixtures expect coreference + salience semantics that the regex
|
|
296
|
+
primitive doesn't model. Tracked for v0.3+; documented in README's
|
|
297
|
+
"Known v0.2 gates" section, `docs/REFERENCE.md`, and the v0.2.0 tag
|
|
298
|
+
annotation.
|
|
299
|
+
|
|
300
|
+
### Hardening (this release also includes the public-flip cleanup)
|
|
301
|
+
- ReDoS guard in `extract.stats()`: numeric quantifiers bounded to
|
|
302
|
+
`\d{1,15}` and sentences containing a 20+ digit unbroken run are
|
|
303
|
+
skipped. Mirror in Rust for byte-identical parity even though Rust's
|
|
304
|
+
regex engine is RE2 and structurally immune. A 50 K-digit input that
|
|
305
|
+
previously hung Python for 224 s now completes in 1.5 ms.
|
|
306
|
+
- UTF-8 char-boundary snap in Rust `extract::stats::ctx()` — accented
|
|
307
|
+
Latin / emoji adjacent to a stat token previously panicked on the
|
|
308
|
+
byte-window slice.
|
|
309
|
+
- Python CLI forces UTF-8 file + stdin reads — fixes mojibake on
|
|
310
|
+
Windows / non-UTF-8 locales and restores parity against the Rust
|
|
311
|
+
CLI.
|
|
312
|
+
|
|
313
|
+
### Documentation
|
|
314
|
+
- `README.md` — new "What's new in v0.2" section, updated install path
|
|
315
|
+
(skimr is not yet on PyPI), "Known v0.2 gates" disclosure.
|
|
316
|
+
- `docs/REFERENCE.md` — full primitive catalog (all 7 extract
|
|
317
|
+
primitives + `summarize(attach=…)` + `brief()` 3 formats).
|
|
318
|
+
- `docs/integration-memo.md` — refreshed to reflect the v0.2 RAG-prep
|
|
319
|
+
API for chunkshop's `summary_embed` / `metadata-extractors` consumers.
|
|
320
|
+
- `MAINTAINERS.md` + `SECURITY.md` + this `CHANGELOG.md` — added for
|
|
321
|
+
public-flip hygiene.
|
|
322
|
+
|
|
323
|
+
## [0.0.1] — early reference tag
|
|
324
|
+
|
|
325
|
+
Original tagged commit, predates the v0.2 differentiation. Not
|
|
326
|
+
recommended for new use; included in the tag list only as historical
|
|
327
|
+
record.
|
lede-0.3.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|