darrinka commited on
Commit
1c1f110
·
verified ·
1 Parent(s): 81a077e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -2
README.md CHANGED
@@ -103,14 +103,24 @@ def convert_hwu64(hwu_utterances, hwu_labels):
103
  target_list.append({"utterance": txt, "label": intent_id})
104
 
105
  utterances = [rec for lst in classwise_utterance_records for rec in lst]
106
- return Dataset.from_dict({"intents": intents, "train": utterances})
107
 
108
  # load
109
  file_url = "https://raw.githubusercontent.com/jianguoz/Few-Shot-Intent-Detection/refs/heads/main/Datasets/HWU64/train/label"
110
  labels = load_text_from_url(file_url).split("\n")[:-1]
111
  file_url = "https://raw.githubusercontent.com/jianguoz/Few-Shot-Intent-Detection/refs/heads/main/Datasets/HWU64/train/seq.in"
112
  utterances = load_text_from_url(file_url).split("\n")[:-1]
 
 
113
 
 
 
 
 
114
  # convert
115
- hwu64_converted = convert_hwu64(utterances, labels)
 
 
 
 
116
  ```
 
103
  target_list.append({"utterance": txt, "label": intent_id})
104
 
105
  utterances = [rec for lst in classwise_utterance_records for rec in lst]
106
+ return {"intents": intents, split: utterances}
107
 
108
  # load
109
  file_url = "https://raw.githubusercontent.com/jianguoz/Few-Shot-Intent-Detection/refs/heads/main/Datasets/HWU64/train/label"
110
  labels = load_text_from_url(file_url).split("\n")[:-1]
111
  file_url = "https://raw.githubusercontent.com/jianguoz/Few-Shot-Intent-Detection/refs/heads/main/Datasets/HWU64/train/seq.in"
112
  utterances = load_text_from_url(file_url).split("\n")[:-1]
113
+ # convert
114
+ hwu64_train = convert_hwu64(utterances, labels, "train")
115
 
116
+ file_url = "https://raw.githubusercontent.com/jianguoz/Few-Shot-Intent-Detection/refs/heads/main/Datasets/HWU64/test/label"
117
+ labels = load_text_from_url(file_url).split("\n")[:-1]
118
+ file_url = "https://raw.githubusercontent.com/jianguoz/Few-Shot-Intent-Detection/refs/heads/main/Datasets/HWU64/test/seq.in"
119
+ utterances = load_text_from_url(file_url).split("\n")[:-1]
120
  # convert
121
+ hwu64_test = convert_hwu64(utterances, labels, "test")
122
+
123
+ hwu64_train["test"] = hwu64_test["test"]
124
+ dataset = Dataset.from_dict(hwu64_train)
125
+
126
  ```