1

Splitting tags before returning them from dictionary

Former-commit-id: fb659e1a6ac96f416d8964e4ef52ee00c772bb10
This commit is contained in:
Alex Yatskov 2013-11-08 14:36:21 -08:00
parent 2e94404b0c
commit 5cbe1a260e

View File

@ -33,7 +33,12 @@ class Dictionary:
cursor = self.db.cursor()
cursor.execute('SELECT * FROM Terms WHERE expression {0} ? OR reading=?'.format('LIKE' if partial else '='), (word, word))
return cursor.fetchall()
results = list()
for expression, reading, definitions, tags in cursor.fetchall():
results.append((expression, reading, definitions, tags.split()))
return results
def findCharacter(self, character):