Skip to content

Instantly share code, notes, and snippets.

View rohitgarud's full-sized avatar
💭
Stop wasting time and 'GIT' it done

Rohit Garud rohitgarud

💭
Stop wasting time and 'GIT' it done
View GitHub Profile
@rohitgarud
rohitgarud / document-embeddings-big_models.ipynb
Created March 21, 2023 12:38 — forked from lmcinnes/document-embeddings-big_models.ipynb
Document Embeddings with Vectorizers and Large USE and BERT models
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rohitgarud
rohitgarud / bm25.py
Created March 17, 2023 09:37 — forked from koreyou/bm25.py
Implementation of OKapi BM25 with sklearn's TfidfVectorizer
""" Implementation of OKapi BM25 with sklearn's TfidfVectorizer
Distributed as CC-0 (https://creativecommons.org/publicdomain/zero/1.0/)
"""
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
from scipy import sparse
class BM25(object):