Files
catena/crates/bindings/python/catena/__init__.py
T
funkpower 6aeea58147 bindings: the footnote signal, which book-pipeline still had its own copy of
`looks_like_footnote_citations` is the function chunkmd's `looks_like_citations`
was ported from, and book-pipeline was still running the Python original at
four call sites. Bound on all four surfaces so it can stop.

Checked against the Python over 34,458 chunks of the live corpus: no
disagreement.
2026-09-20 14:44:09 -04:00

52 lines
1.0 KiB
Python

"""The catena libraries, in process.
Every function here is the same code the command-line tool runs, and hands
back the same record shapes it writes to stdout — dictionaries rather than
lines of JSON.
>>> import catena
>>> chunks = catena.chunk_markdown(markdown, target=512)
>>> chunks[0]["page"]
41
"""
from ._catena import (
__version__,
cue_windows,
chunk_markdown,
citation_prompt,
count_tokens,
find_citations,
fuse_hits,
identify,
looks_like_footnote_citations,
merge_citation_reply,
pack_cues,
parse_identifier,
parse_subtitles,
scrub,
segment_cues,
series_of,
split_collection,
)
__all__ = [
"__version__",
"cue_windows",
"chunk_markdown",
"citation_prompt",
"count_tokens",
"find_citations",
"fuse_hits",
"identify",
"looks_like_footnote_citations",
"merge_citation_reply",
"pack_cues",
"parse_identifier",
"parse_subtitles",
"scrub",
"segment_cues",
"series_of",
"split_collection",
]