Skip to content

Commit

Permalink
Making compliant pathes for linux and windows OS
Browse files Browse the repository at this point in the history
  • Loading branch information
PETERSON Erik committed Sep 4, 2017
1 parent 064c381 commit 6605d1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions chatbot/chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ def __init__(self):
self.sess = None

# Filename and directories constants
self.MODEL_DIR_BASE = 'save/model'
self.MODEL_DIR_BASE = 'save' + os.sep + 'model'
self.MODEL_NAME_BASE = 'model'
self.MODEL_EXT = '.ckpt'
self.CONFIG_FILENAME = 'params.ini'
self.CONFIG_VERSION = '0.5'
self.TEST_IN_NAME = 'data/test/samples.txt'
self.TEST_IN_NAME = 'data' + os.sep + 'test' + os.sep + 'samples.txt'
self.TEST_OUT_SUFFIX = '_predictions.txt'
self.SENTENCES_PREFIX = ['Q: ', 'A: ']

Expand Down
4 changes: 2 additions & 2 deletions chatbot/textdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def _printStats(self):
def _constructBasePath(self):
"""Return the name of the base prefix of the current dataset
"""
path = os.path.join(self.args.rootDir, 'data/samples/')
path = os.path.join(self.args.rootDir, 'data' + os.sep + 'samples' + os.sep)
path += 'dataset-{}'.format(self.args.corpus)
if self.args.datasetTag:
path += '-' + self.args.datasetTag
Expand Down Expand Up @@ -254,7 +254,7 @@ def loadCorpus(self):
if self.args.corpus == 'lightweight':
if not self.args.datasetTag:
raise ValueError('Use the --datasetTag to define the lightweight file to use.')
optional = '/' + self.args.datasetTag # HACK: Forward the filename
optional = os.sep + self.args.datasetTag # HACK: Forward the filename

# Corpus creation
corpusData = TextData.availableCorpus[self.args.corpus](self.corpusDir + optional)
Expand Down

0 comments on commit 6605d1e

Please sign in to comment.