No project description provided
Project description
Splade4Elastic
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.21.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for splade4elastic-0.0.21-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2e7cd9458421860b9786fb62298a2f58a84c64dfcc4a5385dc414cbea2d97e2 |
|
MD5 | 03a6f8f0bf822620ea2593f7d24ad31f |
|
BLAKE2b-256 | 89ed31cef264b7748be2752fc5d0d865e70630505b0a3ddca230a889a914bd31 |