Rijgersberg
commited on
Commit
•
78157fc
1
Parent(s):
eabc2c6
Update README.md
Browse files
README.md
CHANGED
@@ -75,17 +75,18 @@ import pprint
|
|
75 |
|
76 |
from datasets import load_dataset
|
77 |
from sentence_transformers import SentenceTransformer
|
78 |
-
from sentence_transformers.evaluation import
|
79 |
|
80 |
|
81 |
eval_dataset = load_dataset('NetherlandsForensicInstitute/squad-nl-v2.0', split='test')
|
82 |
|
83 |
-
evaluator =
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
|
|
89 |
|
90 |
model = SentenceTransformer('NetherlandsForensicInstitute/robbert-2022-dutch-sentence-transformers')
|
91 |
|
|
|
75 |
|
76 |
from datasets import load_dataset
|
77 |
from sentence_transformers import SentenceTransformer
|
78 |
+
from sentence_transformers.evaluation import EmbeddingSimilarityEvaluator, SimilarityFunction
|
79 |
|
80 |
|
81 |
eval_dataset = load_dataset('NetherlandsForensicInstitute/squad-nl-v2.0', split='test')
|
82 |
|
83 |
+
evaluator = EmbeddingSimilarityEvaluator(
|
84 |
+
sentences1=eval_dataset['question'],
|
85 |
+
sentences2=eval_dataset['context'],
|
86 |
+
scores=eval_dataset['score'],
|
87 |
+
main_similarity=SimilarityFunction.COSINE,
|
88 |
+
name="squad_nl_v2.0_test",
|
89 |
+
)
|
90 |
|
91 |
model = SentenceTransformer('NetherlandsForensicInstitute/robbert-2022-dutch-sentence-transformers')
|
92 |
|