Changling location of deinflect and dictionary data files
Former-commit-id: 9e5ec9facd8ab2c77115689c8b7261b8c5ce41ac
This commit is contained in:
parent
0f530cd3c8
commit
88a3b2e3a0
@ -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
|
||||||
|
@ -22,13 +22,9 @@ 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():
|
||||||
|
directory = os.path.split(__file__)[0]
|
||||||
return translate.Translator(
|
return translate.Translator(
|
||||||
deinflect.Deinflector(buildRelPath('data/deinflect.json')),
|
deinflect.Deinflector(os.path.join(directory, 'deinflect.json')),
|
||||||
dictionary.Dictionary(buildRelPath('data/dictionary.db'))
|
dictionary.Dictionary(os.path.join(directory, 'dictionary.db'))
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user