ddobokki's picture
edit: README.md
66c81d9
---
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- feature-extraction
- sentence-similarity
- transformers
---
ํ•œ๊ตญ์–ด์™€ ์˜์–ด์˜ nli, sts๋ฐ์ดํ„ฐ๋ฅผ klue/roberta-base์— ํ•™์Šต์‹œํ‚จ ๋ชจ๋ธ์ž…๋‹ˆ๋‹ค.
```python
from sentence_transformers import SentenceTransformer
from sklearn.metrics.pairwise import cosine_similarity
query = ['๊ทธ๋Š” ๊ทธ๋…€๋ฅผ ์ข‹์•„ํ•œ๋‹ค.']
sentences = ["he love her", "he hate her", '๊ทธ๋…€๋Š” ๊ทธ๋ฅผ ์‹ซ์–ดํ•œ๋‹ค.','attention is all you need']
emb1 = model.encode(query)
emb2 = model.encode(sentences)
print(cosine_similarity(emb1,emb2))
-> array([[0.62751913, 0.23996451, 0.30788696, 0.08123618]], dtype=float32)
```