Skip to content

Commit 7edb07e

Browse files
author
Tianyu Gao
authored
Merge pull request #257 from sadimanna/main
updated SentEval/senteval/sts.py
2 parents 13361d0 + ec1494c commit 7edb07e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SentEval/senteval/sts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def loadFile(self, fpath):
3939
not_empty_idx = raw_scores != ''
4040

4141
gs_scores = [float(x) for x in raw_scores[not_empty_idx]]
42-
sent1 = np.array([s.split() for s in sent1])[not_empty_idx]
43-
sent2 = np.array([s.split() for s in sent2])[not_empty_idx]
42+
sent1 = np.array([s.split() for s in sent1], dtype=object)[not_empty_idx]
43+
sent2 = np.array([s.split() for s in sent2], dtype=object)[not_empty_idx]
4444
# sort data by length to minimize padding in batcher
4545
sorted_data = sorted(zip(sent1, sent2, gs_scores),
4646
key=lambda z: (len(z[0]), len(z[1]), z[2]))

0 commit comments

Comments
 (0)