From d5d61d31d24e0fc97eb1fac1e1102e7cdb6701af Mon Sep 17 00:00:00 2001 From: Piotr Czapla Date: Thu, 15 Nov 2018 23:47:48 +0100 Subject: [PATCH] Add directory structure to readme. --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ fastai_contrib/utils.py | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 95bddb7..4703a3e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,44 @@ # ulmfit-multilingual Temporary repository used for collaboration on application of for multiple languages. +## data directory strucutre + +Directory structure after changes to the way we process wiki dumps. +``` +data +├── imdb +│   ├── aclImdb +│   ├── imdb_lm +│   └── tmp +├── wiki +│   ├── de-100 +│   │   └── models +│   ├── de-100-unk +│   │   └── models +│   ├── de-2 +│   │   └── models +│   ├── de-2-unk +│   │   └── models +│   ├── de-all +│   │   └── models +│   ├── _dumps +│   ├── _extr +│   │   └── de +│   │   ├── AA +│   │   ├── AB +... +│   │   └── CC +│   ├── wikitext-103 +│   │   └── models +│   └── wikitext-2 +│      └── models +└── xnli + ├── XNLI-1.0 + └── XNLI-MT-1.0 + ├── multinli + └── xnli +``` + ## how to contribute We have a fork of fastai to propose changes to fastai.text, with a branch for this project: https://github.com/n-waves/fastai/tree/ulmfit_multilingual diff --git a/fastai_contrib/utils.py b/fastai_contrib/utils.py index 6a2ba70..b9d9faf 100644 --- a/fastai_contrib/utils.py +++ b/fastai_contrib/utils.py @@ -72,7 +72,7 @@ def prepare_imdb(file_path: str, prepare_lm = False): if not dir_path.exists(): print(f"Extracting {file_path} to {dir_path}. This may take a long time...") tgz_file = tarfile.open(file_path) - tgz_file.extractall(path=dir_path.parent) # the aclImdb.tgz has aclImdb dir packed + tgz_file.extractall(path=dir_path.parent) # the aclImdb.tgz has aclImdb dir packed assert dir_path.exists() print(f"Extracted to {dir_path}")