Downloads · 30 days
3
3% of all-time downloads
dadashzadeh/2023_10_en_keywords_Cryptocurrency
2023_10_en_keywords_Cryptocurrency is a machine learning model from dadashzadeh. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for bm25s.
This is a BM25S index created with the bm25s library (version 0.2.0), an ultra-fast implementation of BM25. It can be used for lexical retrieval tasks.
Downloads · 30 days
3
3% of all-time downloads
All-time downloads
104
Public
Repo size
51 MB
Likes
0
Public
Click a slice to open those files.
.jsonl31.4 MB · 55%
From the Hugging Face model README
This is a BM25S index created with the bm25s library (version 0.2.0), an ultra-fast implementation of BM25. It can be used for lexical retrieval tasks.
BM25S Related Links:
You can install the bm25s library with pip:
pip install "bm25s==0.2.0"
# For huggingface hub usage
pip install huggingface_hub
bm25s indexYou can use this index for information retrieval tasks. Here is an example:
import bm25s
from bm25s.hf import BM25HF
# Load the index
retriever = BM25HF.load_from_hub("dadashzadeh/2023_10_en_keywords_Cryptocurrency")
# You can retrieve now
query = "a cat is a feline"
results = retriever.retrieve(bm25s.tokenize(query), k=3)
bm25s indexYou can save a bm25s index to the Hugging Face Hub. Here is an example:
import bm25s
from bm25s.hf import BM25HF
corpus = [
"northwest bank",
"misfits market",
"merrick bank login",
"marketing",
"market place",
"jetblue customer service",
"internal revenue service",
"how to make money online",
"gordon food service",
"futures market",
"frontier airlines customer service",
"food banks near me",
"first convenience bank",
"eastern bank",
"dollar bank",
]
retriever = BM25HF(corpus=corpus)
retriever.index(bm25s.tokenize(corpus))
token = None # You can get a token from the Hugging Face website
retriever.save_to_hub("dadashzadeh/2023_10_en_keywords_Cryptocurrency", token=token)
You can leverage more advanced features of the BM25S library during load_from_hub:
# Load corpus and index in memory-map (mmap=True) to reduce memory
retriever = BM25HF.load_from_hub("dadashzadeh/2023_10_en_keywords_Cryptocurrency", load_corpus=True, mmap=True)
# Load a different branch/revision
retriever = BM25HF.load_from_hub("dadashzadeh/2023_10_en_keywords_Cryptocurrency", revision="main")
# Change directory where the local files should be downloaded
retriever = BM25HF.load_from_hub("dadashzadeh/2023_10_en_keywords_Cryptocurrency", local_dir="/path/to/dir")
# Load private repositories with a token:
retriever = BM25HF.load_from_hub("dadashzadeh/2023_10_en_keywords_Cryptocurrency", token=token)
This dataset was created using the following data: 497 keywords Cryptocurrency (semrush)
| Statistic | Value |
|---|---|
| Number of documents | 602959 |
| Number of tokens | 2414020 |
| Average tokens per document | 4.0 |
The index was created with the following parameters:
| Parameter | Value |
|---|---|
| k1 | 1.5 |
| b | 0.75 |
| delta | 0.5 |
| method | lucene |
| idf method | lucene |
To cite bm25s, please use the following bibtex:
@misc{lu_2024_bm25s,
title={BM25S: Orders of magnitude faster lexical search via eager sparse scoring},
author={Xing Han Lù},
year={2024},
eprint={2407.03618},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/2407.03618},
}