| 358 | /* ── TF-IDF terms and the combined score ─────────────────────────── */ |
| 359 | |
| 360 | static int sem_terms_of(const cbm_sem_corpus_t *c, char **tokens, int n, cbm_sem_func_t *f, |
| 361 | int *indices, float *weights) { |
| 362 | memset(f, 0, sizeof(*f)); |
| 363 | f->tfidf_indices = indices; |
| 364 | f->tfidf_weights = weights; |
| 365 | f->tfidf_len = cbm_sem_tfidf_terms(c, tokens, NULL, n, indices, weights); |
| 366 | return f->tfidf_len; |
| 367 | } |
| 368 | |
| 369 | /* Two functions share a TF-IDF term only when they share the word. Until |
| 370 | * 2026-10 the term key was the token's POSITION: any two functions of equal |
no test coverage detected