From b32a4efaad3dc2f861d90f5e17d74d71c6f7d5f9 Mon Sep 17 00:00:00 2001 From: "gichang.lee" Date: Sun, 15 Nov 2020 20:20:59 +0900 Subject: [PATCH] Unify variable name: `root_dir_or_paths` -> `root_dir` (#121) --- Korpora/korpus_modu_messenger.py | 8 ++++---- Korpora/korpus_modu_morpheme.py | 8 ++++---- Korpora/korpus_modu_ne.py | 8 ++++---- Korpora/korpus_modu_news.py | 8 ++++---- Korpora/korpus_modu_spoken.py | 8 ++++---- Korpora/korpus_modu_web.py | 8 ++++---- Korpora/korpus_modu_written.py | 8 ++++---- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Korpora/korpus_modu_messenger.py b/Korpora/korpus_modu_messenger.py index c9f22d0..514c9a1 100644 --- a/Korpora/korpus_modu_messenger.py +++ b/Korpora/korpus_modu_messenger.py @@ -12,11 +12,11 @@ class ModuMessengerKorpus(ModuKorpus): - def __init__(self, root_dir_or_paths=None, force_download=False): + def __init__(self, root_dir=None, force_download=False): super().__init__() - if root_dir_or_paths is None: - root_dir_or_paths = os.path.join(default_korpora_path, 'NIKL_MESSENGER') - paths = find_corpus_paths(root_dir_or_paths) + if root_dir is None: + root_dir = os.path.join(default_korpora_path, 'NIKL_MESSENGER') + paths = find_corpus_paths(root_dir) self.train = KorpusData('모두의_메신저_말뭉치(conversation).train', load_modu_messenger(paths)) diff --git a/Korpora/korpus_modu_morpheme.py b/Korpora/korpus_modu_morpheme.py index 99db383..912a419 100644 --- a/Korpora/korpus_modu_morpheme.py +++ b/Korpora/korpus_modu_morpheme.py @@ -12,11 +12,11 @@ class ModuMorphemeKorpus(ModuKorpus): - def __init__(self, root_dir_or_paths=None, force_download=False): + def __init__(self, root_dir=None, force_download=False): super().__init__() - if root_dir_or_paths is None: - root_dir_or_paths = os.path.join(default_korpora_path, 'NIKL_MP') - paths = find_corpus_paths(root_dir_or_paths) + if root_dir is None: + root_dir = os.path.join(default_korpora_path, 'NIKL_MP') + paths = find_corpus_paths(root_dir) self.train = KorpusData('모두의_형태분석_말뭉치.train', load_modu_morpheme(paths)) self.tagmap = { 'JKS': '주격조사', diff --git a/Korpora/korpus_modu_ne.py b/Korpora/korpus_modu_ne.py index 2c388d5..17f1757 100644 --- a/Korpora/korpus_modu_ne.py +++ b/Korpora/korpus_modu_ne.py @@ -12,11 +12,11 @@ class ModuNEKorpus(ModuKorpus): - def __init__(self, root_dir_or_paths=None, force_download=False): + def __init__(self, root_dir=None, force_download=False): super().__init__() - if root_dir_or_paths is None: - root_dir_or_paths = os.path.join(default_korpora_path, 'NIKL_NE') - paths = find_corpus_paths(root_dir_or_paths) + if root_dir is None: + root_dir = os.path.join(default_korpora_path, 'NIKL_NE') + paths = find_corpus_paths(root_dir) self.train = KorpusData('모두의_개체명_말뭉치.train', load_modu_ne(paths)) self.tagmap = { 'PS': 'PERSON', diff --git a/Korpora/korpus_modu_news.py b/Korpora/korpus_modu_news.py index b95eac4..4e118b1 100644 --- a/Korpora/korpus_modu_news.py +++ b/Korpora/korpus_modu_news.py @@ -50,11 +50,11 @@ def __init__(self, force_download=False): class ModuNewsKorpus(ModuKorpus): - def __init__(self, root_dir_or_paths=None, force_download=False, load_light=True): + def __init__(self, root_dir=None, force_download=False, load_light=True): super().__init__(force_download) - if root_dir_or_paths is None: - root_dir_or_paths = os.path.join(default_korpora_path, 'NIKL_NEWSPAPER') - paths = find_corpus_paths(root_dir_or_paths) + if root_dir is None: + root_dir = os.path.join(default_korpora_path, 'NIKL_NEWSPAPER') + paths = find_corpus_paths(root_dir) if load_light: self.train = ModuNewsDataLight('모두의_뉴스_말뭉치(light).train', load_modu_news(paths, load_light)) else: diff --git a/Korpora/korpus_modu_spoken.py b/Korpora/korpus_modu_spoken.py index ce89c34..03c7738 100644 --- a/Korpora/korpus_modu_spoken.py +++ b/Korpora/korpus_modu_spoken.py @@ -12,11 +12,11 @@ class ModuSpokenKorpus(ModuKorpus): - def __init__(self, root_dir_or_paths=None, force_download=False): + def __init__(self, root_dir=None, force_download=False): super().__init__() - if root_dir_or_paths is None: - root_dir_or_paths = os.path.join(default_korpora_path, 'NIKL_SPOKEN') - paths = find_corpus_paths(root_dir_or_paths) + if root_dir is None: + root_dir = os.path.join(default_korpora_path, 'NIKL_SPOKEN') + paths = find_corpus_paths(root_dir) self.train = KorpusData('모두의_구어_말뭉치.train', load_modu_spoken(paths)) diff --git a/Korpora/korpus_modu_web.py b/Korpora/korpus_modu_web.py index 5f42dc3..2eb5de6 100644 --- a/Korpora/korpus_modu_web.py +++ b/Korpora/korpus_modu_web.py @@ -12,11 +12,11 @@ class ModuWebKorpus(ModuKorpus): - def __init__(self, root_dir_or_paths=None, force_download=False): + def __init__(self, root_dir=None, force_download=False): super().__init__() - if root_dir_or_paths is None: - root_dir_or_paths = os.path.join(default_korpora_path, 'NIKL_WEB') - paths = find_corpus_paths(root_dir_or_paths) + if root_dir is None: + root_dir = os.path.join(default_korpora_path, 'NIKL_WEB') + paths = find_corpus_paths(root_dir) self.train = KorpusData('모두의_웹_말뭉치.train', load_modu_web(paths)) diff --git a/Korpora/korpus_modu_written.py b/Korpora/korpus_modu_written.py index 9f793a7..604e857 100644 --- a/Korpora/korpus_modu_written.py +++ b/Korpora/korpus_modu_written.py @@ -12,11 +12,11 @@ class ModuWrittenKorpus(ModuKorpus): - def __init__(self, root_dir_or_paths=None, force_download=False): + def __init__(self, root_dir=None, force_download=False): super().__init__() - if root_dir_or_paths is None: - root_dir_or_paths = os.path.join(default_korpora_path, 'NIKL_WRITTEN') - paths = find_corpus_paths(root_dir_or_paths) + if root_dir is None: + root_dir = os.path.join(default_korpora_path, 'NIKL_WRITTEN') + paths = find_corpus_paths(root_dir) self.train = KorpusData('모두의_문어_말뭉치.train', load_modu_written(paths))