Skip to content

Commit

Permalink
Raise exception when corpus file is not found (#103, #107)
Browse files Browse the repository at this point in the history
  • Loading branch information
lovit committed Oct 10, 2020
1 parent d114e40 commit a037755
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Korpora/korpus_modu_news.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def __init__(self, root_dir_or_paths, load_light=True, force_download=False):
paths = sorted(glob(root_dir_or_paths))
else:
paths = root_dir_or_paths
if not paths:
raise ValueError('Not found corpus files. Check `root_dir_or_paths`')

if load_light:
self.train = ModuNewsDataLight('모두의_뉴스_말뭉치(light).train', load_modu_news(paths, load_light))
else:
Expand Down

0 comments on commit a037755

Please sign in to comment.