Skip to content

Commit

Permalink
Update cnews_loader.py
Browse files Browse the repository at this point in the history
  • Loading branch information
howie6879 committed Jan 15, 2018
1 parent bd38986 commit 719f1c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/cnews_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def read_vocab(vocab_dir):

def read_category():
"""读取分类目录,固定"""
categories = ['体育', '财经', '房产', '家居',
'教育', '科技', '时尚', '时政', '游戏', '娱乐']
categories = [u'体育', u'财经', u'房产', u'家居',
u'教育', u'科技', u'时尚', u'时政', u'游戏', u'娱乐']
cat_to_id = dict(zip(categories, range(len(categories))))

return categories, cat_to_id
Expand Down

0 comments on commit 719f1c7

Please sign in to comment.