diff options
| author | Peng Wu <alexepico@gmail.com> | 2011-07-23 19:00:35 +0800 |
|---|---|---|
| committer | Peng Wu <alexepico@gmail.com> | 2011-07-23 19:00:35 +0800 |
| commit | 0b04b1330a45fdb0108055d322ee7c5588b74bb8 (patch) | |
| tree | 0386f23d902662b3ac72bdb489f594aa12e140d8 | |
| parent | 9e6e016aae1ac59822e7cc6a7e455d19c723413d (diff) | |
| download | trainer-0b04b1330a45fdb0108055d322ee7c5588b74bb8.tar.gz trainer-0b04b1330a45fdb0108055d322ee7c5588b74bb8.tar.xz trainer-0b04b1330a45fdb0108055d322ee7c5588b74bb8.zip | |
begin to write estimate.py
| -rw-r--r-- | estimate.py | 20 | ||||
| -rwxr-xr-x | generate.py | 1 | ||||
| -rw-r--r-- | lib/myconfig.py | 10 |
3 files changed, 31 insertions, 0 deletions
diff --git a/estimate.py b/estimate.py new file mode 100644 index 0000000..c36ee03 --- /dev/null +++ b/estimate.py @@ -0,0 +1,20 @@ +#!/usr/bin/python3 +import sys + +def handleError(error): + sys.exit(error) + +def handleOneModel(modelfile): + pass + +def walkThroughModels(path): + pass + +def gatherModels(indexfile): + pass + +def sortModels(indexfile, sortedindexfile): + pass + +if __name__ == '__main__': + pass diff --git a/generate.py b/generate.py index 9e86ab2..ee67b42 100755 --- a/generate.py +++ b/generate.py @@ -1,6 +1,7 @@ #!/usr/bin/python3 import os import os.path +import sys import subprocess from argparse import ArgumentParser import utils diff --git a/lib/myconfig.py b/lib/myconfig.py index efed55c..73e6b76 100644 --- a/lib/myconfig.py +++ b/lib/myconfig.py @@ -44,6 +44,16 @@ class MyConfig: def getEstimatesModel(self): return self.m_estimates_model + m_estimate_index = 'estimate.index' + + def getEstimateIndex(self): + return self.m_estimate_index + + m_sorted_estimate_index = 'estimate.sorted.index' + + def getSortedEstimateIndex(self): + return self.m_sorted_estimate_index + m_evals_text = \ '/media/data/Program/trainer/tools/libpinyin/data/evals.text' |
