mirror of
https://git.pumpin.online/funkpower/catena.git
synced 2026-10-22 18:57:14 +00:00
`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.
52 lines
1.0 KiB
Python
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",
|
|
]
|