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.13.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for splade4elastic-0.0.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd0ca1e85ff936317bdb96f69d14f5209d67f2e597699020c4b1caac20cb74f1 |
|
MD5 | ed1df6653ddac6c5a84ad778d6a32a6f |
|
BLAKE2b-256 | ba1713765ae8b81c8093a2b523618a44c740570fb876b5feca35f619ebe55d03 |