Datasets:

Languages:
Turkish
Multilinguality:
monolingual
Size Categories:
10M<n<100M
Language Creators:
found
Annotations Creators:
found
Source Datasets:
original
Tags:
License:
ceyhunemreozturk commited on
Commit
7e66328
1 Parent(s): ac5737c

Upload 4 files

Browse files
Files changed (4) hide show
  1. convert_to_hf_dataset.py +5 -3
  2. test.jsonl +0 -0
  3. train.jsonl +0 -0
  4. validation.jsonl +0 -0
convert_to_hf_dataset.py CHANGED
@@ -68,24 +68,26 @@ def prepare_data():
68
  train_labels = []
69
  val_labels = []
70
  test_labels = []
 
71
 
72
  for ind in train_indices:
73
- if label_dict[labels[ind]] == " İhlal":
74
  train_labels.append("Violation")
75
  else:
76
  train_labels.append("No violation")
77
 
78
  for ind in val_indices:
79
- if label_dict[labels[ind]] == " İhlal":
80
  val_labels.append("Violation")
81
  else:
82
  val_labels.append("No violation")
83
 
84
  for ind in test_indices:
85
- if label_dict[labels[ind]] == " İhlal":
86
  test_labels.append("Violation")
87
  else:
88
  test_labels.append("No violation")
 
89
 
90
  train_split = np.concatenate((np.expand_dims(train_list, axis=1), np.expand_dims(train_labels, axis=1)), axis=1)
91
  val_split = np.concatenate((np.expand_dims(val_list, axis=1), np.expand_dims(val_labels, axis=1)), axis=1)
 
68
  train_labels = []
69
  val_labels = []
70
  test_labels = []
71
+ count = 0
72
 
73
  for ind in train_indices:
74
+ if labels[ind] == " İhlal":
75
  train_labels.append("Violation")
76
  else:
77
  train_labels.append("No violation")
78
 
79
  for ind in val_indices:
80
+ if labels[ind] == " İhlal":
81
  val_labels.append("Violation")
82
  else:
83
  val_labels.append("No violation")
84
 
85
  for ind in test_indices:
86
+ if labels[ind] == " İhlal":
87
  test_labels.append("Violation")
88
  else:
89
  test_labels.append("No violation")
90
+ print(count)
91
 
92
  train_split = np.concatenate((np.expand_dims(train_list, axis=1), np.expand_dims(train_labels, axis=1)), axis=1)
93
  val_split = np.concatenate((np.expand_dims(val_list, axis=1), np.expand_dims(val_labels, axis=1)), axis=1)
test.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
train.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
validation.jsonl CHANGED
The diff for this file is too large to render. See raw diff