diff options
author | Peng Wu <alexepico@gmail.com> | 2011-07-13 18:49:30 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-07-13 18:49:30 +0800 |
commit | 0535f73c081f63ec122a374f4d53755958a0d07e (patch) | |
tree | 2c313f88845150c7341f2f7315563b7b83f5a5d4 /lib | |
parent | b33433f0ef359e705e41d799db760d3d54144142 (diff) | |
download | trainer-0535f73c081f63ec122a374f4d53755958a0d07e.tar.gz trainer-0535f73c081f63ec122a374f4d53755958a0d07e.tar.xz trainer-0535f73c081f63ec122a374f4d53755958a0d07e.zip |
begin to write myconfig
Diffstat (limited to 'lib')
-rw-r--r-- | lib/myconfig.py | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/myconfig.py b/lib/myconfig.py new file mode 100644 index 0000000..f2e7195 --- /dev/null +++ b/lib/myconfig.py @@ -0,0 +1,41 @@ +import os + + +class MyConfig: + ''' My Configuration ''' + + m_current_pass_epoch = 1 + + def getEpoch(self): + return m_current_pass_epoch + + m_trainer_dir = '/media/data/Program/trainer' + + def getBaseDir(self): + return m_trainer_dir + + def getTextDir(self): + return m_trainer_dir + os.sep + 'texts' + + def getModelDir(self): + return m_trainer_dir + os.sep + 'models' + + def getFinalModelDir(self): + return m_trainer_dir + os.sep + 'final' + + #about 1,200 Chinese characters + m_minimum_file_size = 5,000 + + def getMinimumFileSize(self): + return m_minimum_file_size + + m_segment_postfix = '.segmented' + + def getSegmentPostfix(self): + return m_segment_postfix + + #For both index page, item page and binary model file + m_status_postfix = '.status' + + def getStatusPostfix(self): + return m_status_postfix |