Skip to content

Commit

Permalink
GH-641: Correct the error with the filename of the dataset in Windows (
Browse files Browse the repository at this point in the history
  • Loading branch information
rain1024 authored Feb 10, 2023
1 parent 8ac3f41 commit 1267d05
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions underthesea/data_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def download_zip_file_to_cache(repo_data):
cached_path(url, cache_dir=cache_dir)
filepath = Path(UNDERTHESEA_FOLDER) / cache_dir / url_filename
cache_folder = Path(UNDERTHESEA_FOLDER) / cache_dir
zip = zipfile.ZipFile(filepath)
zip.extractall(cache_folder)
with zipfile.ZipFile(filepath) as zip:
zip.extractall(cache_folder)
os.remove(filepath)

@staticmethod
Expand Down
28 changes: 14 additions & 14 deletions underthesea/datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ UTS2017-BANK:
license: Open
year: 2017
filepath: ''
url: https://www.dropbox.com/s/xl8sof2i1c35n62/UTS2017_BANK.zip?dl=1
url_filename: UTS2017_BANK.zip?dl=1
url: https://github.com/undertheseanlp/underthesea/releases/download/resources/UTS2017_BANK.zip
url_filename: UTS2017_BANK.zip
VLSP2016-NER:
cache_dir: datasets/VLSP2016-NER
type: Tagged
Expand Down Expand Up @@ -63,45 +63,45 @@ VLSP2013-POS:
filepath: ''
url_filename: VLSP2013-POS.zip?dl=1
VNESES:
cache_dir: datasets/LTA
cache_dir: datasets/VNESES
type: Plaintext
license: Open
year: 2012
filepath: VNESEScorpus.txt
url: https://www.dropbox.com/s/ci2kktkhhq46cnh/VNESEcorpus.txt?dl=1
url_filename: VNESEcorpus.txt?dl=1
url: https://github.com/undertheseanlp/underthesea/releases/download/resources/VNESEcorpus.txt
url_filename: VNESEcorpus.txt
VNTQ_BIG:
cache_dir: datasets/LTA
cache_dir: datasets/VNTQ_BIG
type: Plaintext
license: Open
year: 2012
filepath: VNTQcorpus-big.txt
url: https://www.dropbox.com/s/on6naf4una3r5ot/VNTQcorpus-big.txt?dl=1
url_filename: VNTQcorpus-big.txt?dl=1
url: https://github.com/undertheseanlp/underthesea/releases/download/resources/VNTQcorpus-big.txt
url_filename: VNTQcorpus-big.txt
VNTQ_SMALL:
cache_dir: datasets/LTA
cache_dir: datasets/VNTQ_SMALL
type: Plaintext
license: Open
year: 2012
filepath: VNTQcorpus-small.txt
url: https://www.dropbox.com/s/04wjlnpwe4a94lq/VNTQcorpus-small.txt?dl=1
url_filename: VNTQcorpus-small.txt?dl=1
url: https://github.com/undertheseanlp/underthesea/releases/download/resources/VNTQcorpus-small.txt
url_filename: VNTQcorpus-small.txt
VNTC:
cache_dir: datasets/VNTC
type: Categorized
license: Open
year: 2007
filepath: ''
url: https://www.dropbox.com/s/4iw3xtnkd74h3pj/VNTC.zip?dl=1
url_filename: VNTC.zip?dl=1
url: https://github.com/undertheseanlp/underthesea/releases/download/resources/VNTC.zip
url_filename: VNTC.zip
CP_Vietnamese-UNC:
cache_dir: datasets/CP_Vietnamese-UNC
type: Plaintext
license: Open
year: 2020
filepath: ''
url: https://github.com/undertheseanlp/resources/releases/download/1.3.x/CP_Vietnamese-UNC-2.0-alpha.zip
url_filename: CP_Vietnamese-UNC.zip
url_filename: CP_Vietnamese-UNC-2.0-alpha.zip
DI_Vietnamese-UVD:
cache_dir: datasets/DI_Vietnamese-UVD
type: Dictionary
Expand Down

0 comments on commit 1267d05

Please sign in to comment.