1

Moving location of deinflect and dictionary data

Former-commit-id: 148b64a53c3c62daf60c2c959f0140b1a39bb08b
This commit is contained in:
Alex Yatskov 2013-11-10 04:26:15 -08:00
parent 218346eee6
commit e7636cd4f5
5 changed files with 3 additions and 8 deletions

View File

@ -3,7 +3,7 @@
KANJIDIC=util/data/kanjidic KANJIDIC=util/data/kanjidic
KRADFILE=util/data/kradfile KRADFILE=util/data/kradfile
EDICT=util/data/edict EDICT=util/data/edict
DICT=yomi_base/japanese/data/dictionary.db DICT=yomi_base/japanese/dictionary.db
rm $DICT rm $DICT
util/compile.py --kanjidic $KANJIDIC --kradfile $KRADFILE --edict $EDICT $DICT util/compile.py --kanjidic $KANJIDIC --kradfile $KRADFILE --edict $EDICT $DICT

View File

@ -22,13 +22,8 @@ import os.path
import translate import translate
def buildRelPath(path):
directory = os.path.split(__file__)[0]
return os.path.join(directory, path)
def initLanguage(): def initLanguage():
return translate.Translator( return translate.Translator(
deinflect.Deinflector(buildRelPath('data/deinflect.json')), deinflect.Deinflector('data/deinflect.json'),
dictionary.Dictionary(buildRelPath('data/dictionary.db')) dictionary.Dictionary('data/dictionary.db')
) )