Skip to content

Commit

Permalink
expand ~ in bicleaner/dictionary path
Browse files Browse the repository at this point in the history
  • Loading branch information
zuny26 committed Mar 2, 2021
1 parent ff08390 commit 7494a43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ def validate_args(config):
schema['until']['allowed'].append('bicleaner')
schema['parallelWorkers']['allowed'].append('bicleaner')

if not os.path.isfile(config['bicleaner']):
if not os.path.isfile(os.path.expanduser(config['bicleaner'])):
schema['bicleanerCorpusTrainingPrefix']['required']=True
schema['initCorpusTrainingPrefix']['required']=True
schema['dic']['required'] = True

if 'dic' in config and not os.path.isfile(config['dic']):
if 'dic' in config and not os.path.isfile(os.path.expanduser(config['dic'])):
# if 'dic' in config and does not exist, we need to generate a new dictionary
schema['initCorpusTrainingPrefix']['required']=True

Expand Down

0 comments on commit 7494a43

Please sign in to comment.