def get_score(self, terms):
        """Get score for a list of terms.
        
        :type terms: list
        :param terms: A list of terms to be analyzed.
        
        :returns: dict
        """
        assert isinstance(terms, list) or isinstance(terms, tuple)
        score_li = np.asarray([self._get_score(t) for t in terms])
        
        s_pos = np.sum(score_li[score_li > 0])
        s_neg = -np.sum(score_li[score_li < 0])
        
        s_pol = (s_pos-s_neg) * 1.0 / ((s_pos+s_neg)+self.EPSILON)
        s_sub = (s_pos+s_neg) * 1.0 / (len(score_li)+self.EPSILON)
        
        return {self.TAG_POS: s_pos,
                self.TAG_NEG: s_neg,
                self.TAG_POL: s_pol,
                self.TAG_SUB: s_sub}
def get_score ( self , terms ) : assert isinstance ( terms , list ) or isinstance ( terms , tuple ) score_li = np . asarray ( [ self . _get_score ( t ) for t in terms ] ) s_pos = np . sum ( score_li [ score_li > 0 ] ) s_neg = - np . sum ( score_li [ score_li < 0 ] ) s_pol = ( s_pos - s_neg ) * 1.0 / ( ( s_pos + s_neg ) + self . EPSILON ) s_sub = ( s_pos + s_neg ) * 1.0 / ( len ( score_li ) + self . EPSILON ) return { self . TAG_POS : s_pos , self . TAG_NEG : s_neg , self . TAG_POL : s_pol , self . TAG_SUB : s_sub }
Get score for a list of terms.
        
        :type terms: list
        :param terms: A list of terms to be analyzed.
        
        :returns: dict