MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / sem_terms_of

Function sem_terms_of

tests/test_semantic.c:360–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358/* ── TF-IDF terms and the combined score ─────────────────────────── */
359
360static 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

Callers 1

test_semantic.cFile · 0.85

Calls 1

cbm_sem_tfidf_termsFunction · 0.85

Tested by

no test coverage detected