Exemplo n.º 1
0
 def __init__(self):
     """
     features:
         1. words mix in title and sentence
         2. keywords in sentence
         3. Position of sentence
         4. Length of sentence
     """
     self.algorithm = 'word_significance'
     self.stop_words = stop_words.values()
     self.num = 0
Exemplo n.º 2
0
 def __init__(self):
     from macropodus.segment import segs
     self.dict_words_freq = segs.dict_words_freq
     self.algorithm = "new-word-discovery"
     self.stop_words = stop_words
     self.total_words_len = {}
     self.total_words = 0
     self.freq_min = 3
     self.len_max = 7
     self.eps = 1e-9
     self.empty_words = [sw for sw in stop_words.values()
                         if len(sw) == 1]  # 虚词
Exemplo n.º 3
0
 def __init__(self):
     self.stop_words = stop_words.values()
     self.algorithm = 'lda'
Exemplo n.º 4
0
 def __init__(self):
     self.algorithm = 'text_teaser'
     self.stop_words = stop_words.values()
     self.len_ideal = 18 # 中心句子长度, 默认
Exemplo n.º 5
0
 def __init__(self):
     self.algorithm = 'textrank_gensim'
     self.stop_words = stop_words.values()
     self.len_ideal = 18  # 中心句子长度, 默认