allow for single term topics
This commit is contained in:
parent
7acc3bc9e6
commit
46c6761680
|
@ -38,7 +38,11 @@ def get_topics_dict():
|
|||
return {}
|
||||
topics = {}
|
||||
for line in settings.topics.splitlines():
|
||||
id, term = line.strip().split('|')
|
||||
if line.count('|') == 1:
|
||||
id, term = line.strip().split('|')
|
||||
else:
|
||||
term = line.strip()
|
||||
id = term.encode('ascii', 'replace')
|
||||
topics[id] = (term, normalizer.normalize(term).lower())
|
||||
return topics
|
||||
|
||||
|
|
Reference in New Issue