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
@lmcinnes
lmcinnes / document-embeddings-big_models.ipynb
Created June 30, 2021 21:27
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.
@koreyou
koreyou / bm25.py
Created November 1, 2019 05:26
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):