Metadata-Version: 2.1
Name: splade4elastic
Version: 0.0.12
Home-page: https://github.com/argmaxml/splade4elastic
Author: ArgmaxML
Author-email: splade@argmaxml.com
Description-Content-Type: text/markdown
Requires-Dist: numpy >=1.21.2
Requires-Dist: transformers >=4.0.0
Provides-Extra: elasticsearch
Requires-Dist: elasticsearch >=8.5.0 ; extra == 'elasticsearch'
Provides-Extra: faiss
Requires-Dist: faiss-cpu >=1.7.1 ; extra == 'faiss'

# 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))

