Views
No views yet
v2 is a drop-in replacement; v1 stays available
for reproducing the earlier results.prompt_name="query" for query texts (Jerome), corresponding to a "Query: " prefixprompt_name="match" for candidate texts (classical authors), corresponding to a "Candidate: " prefix1from sentence_transformers import SentenceTransformer
2from sentence_transformers.util import cos_sim
3
4model = SentenceTransformer("julian-schelb/multilingual-e5-large-emb-lat-intertext-v2")
5
6# Jerome text and candidates (1 positive match, 2 unrelated)
7queries = [
8 "omnia fert aetas, animum quoque; saepe ego longos cantando puerum memini me condere soles."
9]
10candidates = [
11 "saepe ego longos cantando puerum memini me condere soles.", # positive match
12 "Gallia est omnis divisa in partes tres", # unrelated (Caesar)
13 "in nova fert animus mutatas dicere formas", # unrelated (Ovid)
14]
15
16query_embeddings = model.encode(queries, prompt_name="query")
17candidate_embeddings = model.encode(candidates, prompt_name="match")
18
19scores = cos_sim(query_embeddings, candidate_embeddings)
20print(scores)
21print(f"Best candidate: {scores[0].argmax().item()}")prompt_name="match" and each
query with prompt_name="query", then rank by cosine similarity. Retrieval is
typically followed by a classification model — see the
*-3class-lat-intertext-v1 classifiers in the same collection.1@misc{schelb2026locisimilesbenchmarkextracting,
2 title={Loci Similes: A Benchmark for Extracting Intertextualities in Latin Literature},
3 author={Julian Schelb and Michael Wittweiler and Marie Revellio and Barbara Feichtinger and Andreas Spitz},
4 year={2026},
5 eprint={2601.07533},
6 archivePrefix={arXiv},
7 primaryClass={cs.IR},
8 url={https://arxiv.org/abs/2601.07533},
9}