Skip to content

Commit

Permalink
Swap argument position; method and force_download (#57, #4)
Browse files Browse the repository at this point in the history
  • Loading branch information
lovit committed Sep 8, 2020
1 parent 9f52a2b commit 3df7253
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions Korpora/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,14 @@ def get_confirm_token(response):
progress.close()


def fetch(
remote_path,
local_path,
corpus_name=None,
method="download",
forced_download=False
):
def fetch(remote_path, local_path, corpus_name=None, forced_download=False, method="download"):
"""
Examples::
>>> from Korpora.utils import fetch
>>> fetch('https://raw.githubusercontent.com/e9t/nsmc/master/ratings_train.txt', 'nsmc/ratings_train.txt', 'nsmc')
>>> fetch(
>>> 'https://raw.githubusercontent.com/e9t/nsmc/master/ratings_train.txt',
>>> 'nsmc/ratings_train.txt', 'nsmc')
"""
destination = os.path.abspath(local_path)
if forced_download or not check_path(destination):
Expand Down

0 comments on commit 3df7253

Please sign in to comment.