jtalk_dir = unicode(os.path.dirname(__file__), 'mbcs')
if hasattr(sys,'frozen'):
- d = os.path.join(os.getcwdu(), 'synthDrivers', '_jtalk107')
+ d = os.path.join(os.getcwdu(), 'synthDrivers', 'jtalk')
if os.path.isdir(d):
jtalk_dir = d
-mecab_dir = os.path.join(jtalk_dir, '..', 'jtalk')
+mecab_dir = jtalk_dir
DEBUG = False
\r
_logwrite = None\r
\r
+MECAB_DIR = unicode(os.path.dirname(__file__), 'mbcs')\r
+if hasattr(sys,'frozen'):\r
+ d = os.path.join(os.getcwdu(), 'synthDrivers', 'jtalk')\r
+ if os.path.isdir(d):\r
+ MECAB_DIR = d\r
+\r
try:\r
from logHandler import log\r
_logwrite = log.debug\r
\r
mecab_initialized = False\r
\r
-def initialize(jtalk_dir=None, logwrite=_logwrite):\r
+def initialize(mecab_dir_=None, logwrite=_logwrite):\r
global mecab_initialized\r
- if jtalk_dir:\r
- Mecab_initialize(logwrite, jtalk_dir)\r
+ if mecab_dir_:\r
+ Mecab_initialize(logwrite, mecab_dir_)\r
else:\r
- Mecab_initialize(logwrite)\r
+ Mecab_initialize(logwrite, MECAB_DIR)\r
if logwrite: logwrite("initialize() done.")\r
mecab_initialized = True\r
\r