Return a callable that maps text to an embedding vector.
(self)
| 23 | |
| 24 | @abstractmethod |
| 25 | def get_embedding_function(self) -> Callable[[str], np.ndarray]: |
| 26 | """Return a callable that maps text to an embedding vector.""" |
| 27 | pass |
| 28 | |
| 29 | class TfidfEmbedder(BaseEmbedder): |
| 30 | """TF-IDF embedder backed by scikit-learn.""" |