sentence-transformers How to use gubartz/facet_retriever with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("gubartz/facet_retriever")
sentences = [
"method: Making reflective work practices visible",
"method: Job quality takes into account both wage and non-wage attributes of a job.",
"purpose: There could therefore be rank differences in the leadership behavioural patterns of managers.",
"negative: SN has a positive effect on the user's intention to use toward the SNS."
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]