Fiqh-Glossary Linker
maps a technical term or phrase — and, in most cases, a sentence built around one — to its entry in a glossary of 2,034 jurisprudential terms in Arabic and Persian. Give it
مسح الرأس في الوضوء
and it returns the entries for
مسح
and
مسح اعضاي وضو
; give it
خيار غبن
and it lands on that entry whether the reader is Arabic or Persian. It is the piece that turns a passage into a hover-to-define reading experience, and a question into its controlled vocabulary.
Built by
Sadiqoon Technologies
on
intfloat/multilingual-e5-base
(278M parameters), shipped with the glossary vectors so linking works out of the box.
رابطُ مصطلحات: يأخذ مصطلحًا فقهيًّا أو جملةً تحتويه، عربيةً أو فارسية، ويردّه إلى مدخله في معجمٍ من 2,034 مصطلحًا. يشحن مع متجهات المعجم جاهزةً للاستعمال.
Highlights
Term or phrase in, entry out.
Trained on headwords and on sentences from the reference works that use them, so it copes with inflected forms and short running text.
Arabic ⇄ Persian.
Entries are defined in either language; the linker resolves across both.
Ships with the index.
glossary_vectors.npy
and
glossary_index.json
are included — no need to build anything.
Small and fast.
278M parameters; thousands of sentences per second on a single GPU.
Evaluation
772 held-out sentences from the reference works, each containing a glossary term, ranked against all 2,034 entries:
multilingual-e5-base
Fiqh-Glossary Linker
Recall@1
0.197
0.764
Recall@5
0.381
0.955
MRR
0.284
0.852
Training
Contrastive fine-tuning (in-batch negatives, temperature 0.05) on ~6,000 pairs: every glossary headword to its definition, plus sentences mined from the reference corpus that use the term in context. Five epochs.
Usage
Link a sentence to the glossary
import json, numpy as np
from huggingface_hub import hf_hub_download
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("sadiqoon/fiqh-glossary-linker")
V = np.load(hf_hub_download("sadiqoon/fiqh-glossary-linker", "glossary_vectors.npy")).astype("float32")
index = json.load(open(hf_hub_download("sadiqoon/fiqh-glossary-linker", "glossary_index.json")))
deflink(text, k=3):
q = model.encode("query: " + text, normalize_embeddings=True)
top = np.argsort(-(V @ q))[:k]
return [(index[i]["term"], index[i]["lang"], float(V[i] @ q)) for i in top]
link("خيار غبن")
# [('خيار غبن', 'fa', 0.93), ('غبن', 'fa', 0.76), ('غبن فاحش', 'fa', 0.56)]
link("مسح الرأس في الوضوء")
# [('مسح', 'fa', 0.73), ('مسح اعضاي وضو', 'fa', 0.52), ('فحص', 'fa', 0.46)]
Embed your own glossary
Entries were encoded as
"passage: <term> — <definition>"
and queries as
"query: <text>"
; keep the same prefixes to add or replace entries.
Citation
@misc{sadiqoon2026fiqhglossary,
title = {Fiqh-Glossary Linker: Term Linking for Arabic and Persian Jurisprudence},
author = {Sadiqoon Technologies},
year = {2026},
url = {https://huggingface.co/sadiqoon/fiqh-glossary-linker}
}
fiqh-glossary-linker huggingface.co is an AI model on huggingface.co that provides fiqh-glossary-linker's model effect (), which can be used instantly with this sadiqoon fiqh-glossary-linker model. huggingface.co supports a free trial of the fiqh-glossary-linker model, and also provides paid use of the fiqh-glossary-linker. Support call fiqh-glossary-linker model through api, including Node.js, Python, http.
fiqh-glossary-linker huggingface.co is an online trial and call api platform, which integrates fiqh-glossary-linker's modeling effects, including api services, and provides a free online trial of fiqh-glossary-linker, you can try fiqh-glossary-linker online for free by clicking the link below.
sadiqoon fiqh-glossary-linker online free url in huggingface.co:
fiqh-glossary-linker is an open source model from GitHub that offers a free installation service, and any user can find fiqh-glossary-linker on GitHub to install. At the same time, huggingface.co provides the effect of fiqh-glossary-linker install, users can directly use fiqh-glossary-linker installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
fiqh-glossary-linker install url in huggingface.co: