Spaces:
Running
Running
pass IDF DTM to the function factory
Browse files- src/tfidf_search.py +1 -1
src/tfidf_search.py
CHANGED
|
@@ -55,7 +55,7 @@ def query_worker(query: str, rownames: list[str], fasttext_model: fasttext.FastT
|
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
-
def query_factory(rownames: list[str], dtm_svd: NDArray[np.float64], dtm_svd_mat: NDArray[np.float64], vocab_norm: NDArray[np.float64], concentration: float = 10) -> Callable[[str], pl.DataFrame]:
|
| 59 |
"""
|
| 60 |
Create a function that will compare query text to the documents in the corpus.
|
| 61 |
|
|
|
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
+
def query_factory(rownames: list[str], dtm_svd: NDArray[np.float64], dtm_svd_mat: NDArray[np.float64], idf: NDArray[np.float64], vocab_norm: NDArray[np.float64], concentration: float = 10) -> Callable[[str], pl.DataFrame]:
|
| 59 |
"""
|
| 60 |
Create a function that will compare query text to the documents in the corpus.
|
| 61 |
|