abuelnasr commited on
Commit
47dacfc
1 Parent(s): db72e8f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -9
README.md CHANGED
@@ -48,22 +48,15 @@ For more information about the dataset, visit the original dataset repo: [Cohere
48
  the data was extracted using this simple code:
49
 
50
  ```python
51
- # Helper Function.
52
- def drop_keys(x,):
53
- keys = ["language_code", "user_id"]
54
- for key in keys:
55
- x.pop(key)
56
- return x
57
-
58
  # Train split.
59
  aya_train = datasets.load_dataset("CohereForAI/aya_dataset", split="train")
60
  arb_train = aya_train.filter(lambda x: x["language_code"] == "arb")
61
- arb_train = arb_train.map(drop_keys)
62
 
63
  # Test split.
64
  aya_test = datasets.load_dataset("CohereForAI/aya_dataset", split="test")
65
  arb_test = aya_test.filter(lambda x: x["language_code"] == "arb")
66
- arb_test = arb_test.map(drop_keys)
67
 
68
  # create dataset dictionary.
69
  arabic_aya = datasets.DatasetDict({
 
48
  the data was extracted using this simple code:
49
 
50
  ```python
 
 
 
 
 
 
 
51
  # Train split.
52
  aya_train = datasets.load_dataset("CohereForAI/aya_dataset", split="train")
53
  arb_train = aya_train.filter(lambda x: x["language_code"] == "arb")
54
+ arb_train = arb_train.remove_columns(["language_code", "user_id"])
55
 
56
  # Test split.
57
  aya_test = datasets.load_dataset("CohereForAI/aya_dataset", split="test")
58
  arb_test = aya_test.filter(lambda x: x["language_code"] == "arb")
59
+ arb_test = arb_test.remove_columns(["language_code", "user_id"])
60
 
61
  # create dataset dictionary.
62
  arabic_aya = datasets.DatasetDict({