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.23.tar.gz
(3.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file splade4elastic-0.0.23.tar.gz.
File metadata
- Download URL: splade4elastic-0.0.23.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d88764ff305833ce57c52d0beb2ad3308b8bc6e8fb3d8e9e89e6a653155477e
|
|
| MD5 |
e4066813d4061674c1518b44d7028763
|
|
| BLAKE2b-256 |
8be6c758b971325db5cfe859ba85bef46c886b371832717500c8376ffe4bbbca
|
File details
Details for the file splade4elastic-0.0.23-py3-none-any.whl.
File metadata
- Download URL: splade4elastic-0.0.23-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8011e898a88b3fd16970acd6b23af281d28b54ac818e1147ac01b4b84caa968
|
|
| MD5 |
17e5680409f6e81229a311a65038eac0
|
|
| BLAKE2b-256 |
c3e63671fab1cc11a2ebbce0f7e228e7c13d8953d8b53ee21ba24a425c8d93b7
|