https://github.com/argmaxml/splade4elastic
https://github.com/argmaxml/splade4elastic
elasticsearch language-model query-expansion sparse vector-search
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/argmaxml/splade4elastic
- Owner: argmaxml
- Created: 2023-08-02T08:33:24.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-02T04:15:47.000Z (about 2 years ago)
- Last Synced: 2024-12-12T22:16:54.581Z (10 months ago)
- Topics: elasticsearch, language-model, query-expansion, sparse, vector-search
- Language: Jupyter Notebook
- Homepage:
- Size: 55.7 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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))