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 = "roberta-base"
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.22.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for splade4elastic-0.0.22-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2aeefabc565de258213123a0d5e4954794bd4254efc3d9829e919614d7b90000 |
|
MD5 | 34411ef01caaa03a0667a599218848f7 |
|
BLAKE2b-256 | eaf8bb886161f8963bbaac24a7ecb684ee4b692b8c4223e9c3a9507251873338 |