1

Revert "Moving location of deinflect and dictionary data"

This reverts commit e7636cd4f5 [formerly 148b64a53c3c62daf60c2c959f0140b1a39bb08b].


Former-commit-id: 7e8125b59820a6f3e38d31865e3f9bf063e67835
This commit is contained in:
Alex Yatskov 2013-11-10 04:28:09 -08:00
parent e7636cd4f5
commit 0f530cd3c8
5 changed files with 8 additions and 3 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/dictionary.db DICT=yomi_base/japanese/data/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,8 +22,13 @@ 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('data/deinflect.json'), deinflect.Deinflector(buildRelPath('data/deinflect.json')),
dictionary.Dictionary('data/dictionary.db') dictionary.Dictionary(buildRelPath('data/dictionary.db'))
) )