Subversion Repositories LCARS

Compare Revisions

Last modification

Ignore whitespace Rev 293 → Rev 294

/trunk/tools/eazytrans/vuh.py
96,7 → 96,7
text = argv[1]
 
dictionary = VulcanDictionary(dictionary)
dictionary.load('vuh-gol-en.dict.zdb.txt')
dictionary.load('vuh-gol-en.dict.zdb.txt', 'vuh')
dictionary.clean()
 
# try:
/trunk/tools/eazytrans/Dictionary.py
36,7 → 36,7
_keys = "ipa|en|lit|pos|com|tag|ex"
_expressions = {}
 
def load (self, dictionary_file):
def load (self, dictionary_file, language_key='en'):
dictionary = self
 
dmsg('Loading dictionary '.format(dictionary_file), end='', min_level=1)
59,7 → 59,7
indent = None
 
for line in f:
m = match(r'^\s*vuh:\s*(?P<phrase>.+)', line)
m = match(r'^\s*{0}:\s*(?P<phrase>.+)'.format(language_key), line)
if m is not None:
phrase = m.group("phrase")
dictionary[phrase] = {}