MCPcopy Create free account
hub / github.com/cosdata/cosdata / create_explicit_index

Function create_explicit_index

tests/test-tf-idf-bm25.py:58–64  ·  view source on GitHub ↗

Create TF-IDF index using cosdata client

(collection, k, b)

Source from the content-addressed store, hash-verified

56
57
58def create_explicit_index(collection, k, b):
59 """Create TF-IDF index using cosdata client"""
60 # For TF-IDF, we create a specific index configuration
61 index = collection.create_tf_idf_index(
62 name=collection.name, sample_threshold=1000, k1=k, b=b
63 )
64 return index
65
66
67def compute_bm25_idf(total_documents, docs_containing_term):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected