Skip to content

SST2 test.tsv #5

Description

@houuuuuie

Hi, @fatih-ilhan !
I notice that there is a file named 'test.tsv' when loading the SST2 test set.
And the original version in SST2 test set 's labels are -1.
As your code , it needs to be relabeled.
Could you please sent me a copy of this file?

    test_df = pd.read_csv('datasets/sst2/test.tsv', header=None, sep='\t')
    synch_list = [test_set['sentence'].index(s.lower().replace('-lrb-', '(').replace('-rrb-', ')'))
                  for s in test_df.iloc[:, 0].tolist()]
    synch_list = [synch_list.index(i) for i in range(len(synch_list))]
    new_labels = [test_df.iloc[:, -1].tolist()[x] for x in synch_list]
    def change_label(data, idx):
        data['label'] = new_labels[idx]
        return data

    test_set = test_set.map(change_label, with_indices=True)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions