Rijgersberg commited on
Commit
78157fc
1 Parent(s): eabc2c6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -7
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 BinaryClassificationEvaluator
79
 
80
 
81
  eval_dataset = load_dataset('NetherlandsForensicInstitute/squad-nl-v2.0', split='test')
82
 
83
- evaluator = BinaryClassificationEvaluator(
84
- sentences1=eval_dataset["question"],
85
- sentences2=eval_dataset["context"],
86
- labels=eval_dataset["score"],
87
- name="squad_nl_v2.0_test",
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