MCPcopy Create free account
hub / github.com/apache/singa / unzip_data

Function unzip_data

examples/qabot/qabot_data.py:38–45  ·  view source on GitHub ↗
(download_dir, data_zip)

Source from the content-addressed store, hash-verified

36
37
38def unzip_data(download_dir, data_zip):
39 data_dir = download_dir + "insuranceQA-master/V2/"
40 if not os.path.exists(data_dir):
41 print("extracting %s to %s" % (download_dir, data_dir))
42 from zipfile import ZipFile
43 with ZipFile(data_zip, 'r') as zipObj:
44 zipObj.extractall(download_dir)
45 return data_dir
46
47
48def get_label2answer(data_dir):

Callers 1

prepare_dataFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected