Exemple #1
0
 def __init__(self, fine_grained=False,lower=False):
     super(yelpLoader, self).__init__()
     tag_v = {'1.0': 'very negative', '2.0': 'negative', '3.0': 'neutral',
              '4.0': 'positive', '5.0': 'very positive'}
     if not fine_grained:
         tag_v['1.0'] = tag_v['2.0']
         tag_v['5.0'] = tag_v['4.0']
     self.fine_grained = fine_grained
     self.tag_v = tag_v
     self.lower = lower
     self.tokenizer = get_tokenizer()
Exemple #2
0
 def __init__(self):
     super(IMDBLoader, self).__init__()
     self.tokenizer = get_tokenizer()