def _read_emodic(self):
""" Load emotion dictionaries """
self.emodic = {'emotem': {}, 'emotion': {}}
# Reading dictionaries of syntactical indicator of emotiveness
emotemy = ('interjections', 'exclamation', 'vulgar', 'endearments', 'emotikony', 'gitaigo')
for emotem_class in emotemy:
data = pkgutil.get_data('mlask',
os.path.join('emotemes', '%s_uncoded.txt') % emotem_class)
phrases = data.decode('utf8').splitlines()
self.emodic['emotem'][emotem_class] = phrases
# Reading dictionaries of emotion
emotions = ('aware', 'haji', 'ikari', 'iya', 'kowa', 'odoroki', 'suki', 'takaburi', 'yasu', 'yorokobi')
for emotion_class in emotions:
data = pkgutil.get_data('mlask',
os.path.join('emotions', '%s_uncoded.txt') % emotion_class)
phrases = data.decode('utf8').splitlines()
self.emodic['emotion'][emotion_class] = phrases
评论列表
文章目录