How to use DoDucAnh/MNLP_M2_document_encoder with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("DoDucAnh/MNLP_M2_document_encoder") sentences = [ "'আমি' শব্দটি কোন লিঙ্গ?\nA. উভয় লিঙ্গ\nB. ক্লীব লিঙ্গ\nC. পুংলিঙ্গ\nD. স্ত্রী লিঙ্গ", "F.P. Dobroslavin, tibbin müxtəlif sahələri üzrə tanınmış bir alimdir, ancaq daha çox baş vermiş tədqiqatlara görə seçilir. Onun əməyinin sanitar-gigiyenik sahəyə təsiri əhəmiyyətlidir.", "বাংলা ভাষায় শব্দগুলোর লিঙ্গ সাধারণত তিনটি মূল শ্রেণিতে ভাগ হয়: পুংলিঙ্গ (পুরুষ), স্ত্রী লিঙ্গ (মহিলা), এবং ক্লীব লিঙ্গ (যার কোনো লিঙ্গ নেই)।", "Waves are disturbances that transfer energy from one place to another without transferring matter. Think of a ripple on a pond – the water molecules don't travel across the pond with the ripple; they mostly move up and down as the energy passes through them." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4]
The community tab is the place to discuss and collaborate with the HF community!