cueseg: chapter by vectors somebody else made, where there are some

The hashed bag of words asks only whether two stretches repeat the same
words, and cannot tell that ships and vessels are one subject. An embedding
can. segment_with takes one vector per window and falls back to the words
when it is given none, or the wrong number of them — a caller that embedded
some other recording's windows is asking about that recording.

windows_of gives the text to embed, in the order the vectors come back in,
so nobody has to reimplement the windowing pass to use this.

Bound in all three languages, and on the command line as --windows and
--embeddings, which pipe through emb. The C ABI version goes to 2:
catena_segment_cues gained an argument.
This commit is contained in:
funkpower
2026-09-20 09:12:04 -04:00
parent dd09499e68
commit 0b849c39c4
14 changed files with 359 additions and 24 deletions
@@ -12,6 +12,7 @@ lines of JSON.
from ._catena import (
__version__,
cue_windows,
chunk_markdown,
count_tokens,
fuse_hits,
@@ -27,6 +28,7 @@ from ._catena import (
__all__ = [
"__version__",
"cue_windows",
"chunk_markdown",
"count_tokens",
"fuse_hits",