(download_dir, data_gz)
| 104 | |
| 105 | |
| 106 | def unzip_data(download_dir, data_gz): |
| 107 | data_dir = download_dir + 'aclImdb' |
| 108 | if not os.path.exists(data_dir): |
| 109 | print("extracting %s to %s" % (download_dir, data_dir)) |
| 110 | with tarfile.open(data_gz) as tar: |
| 111 | tar.extractall(download_dir) |
| 112 | return data_dir |
| 113 | |
| 114 | |
| 115 | def strip_html(text): |