No project description provided
Project description
Elastic4Splade
A simple query expansion wrapper for elastic search, that uses keyword custom weights derived from an huggingface masked-language-model transformer.
Example usage
from splade4elastic import SpladeRewriter
model_name = "bert-base-uncased"
splader = SpladeRewriter(model_name)
test_texts = [
"My name is John",
"The quick brown fox jumps over the lazy dog",
"I like to eat apples",
]
for test_text in test_texts:
print(test_text)
print(splader.query_expand(test_text))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
splade4elastic-0.0.11.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for splade4elastic-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d220da445bf7f730dc588eb1ff21eca7ab4a31fa3c26cb6a5f8d01f6a164044 |
|
MD5 | febdb88600398b5b0d6945af7561587c |
|
BLAKE2b-256 | 5199f7697113a4c99855be43e4533fec0f21cfd469c99c6169a45aac3a67ceca |