MCPcopy Create free account
hub / github.com/MachineLP/TextMatch / _gen_dic

Method _gen_dic

textmatch/models/text_embedding/bow_sklearn.py:104–110  ·  view source on GitHub ↗
(self, word_list)

Source from the content-addressed store, hash-verified

102
103 # build dic
104 def _gen_dic(self, word_list):
105 #print ('word_list>>>>>', word_list)
106 dic = self.vectorizer.fit_transform(word_list)
107 with open(self.dic_path, 'wb') as f:
108 pickle.dump(self.vectorizer, f)
109 #print( 'vectorizer>>>>', self.vectorizer.get_feature_names() )
110 return dic
111
112 # build tf-idf model
113 def _gen_model(self, word_list):

Callers 1

_gen_modelMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected