JackHCC / Chinese-Keyphrase-Extraction

无监督中文关键词抽取(Keyphrase Extraction),基于统计,基于图【LDA与PageRank(TextRank, TPR, Salience Rank, Single TPR等)】,基于嵌入【SIFRank等】,开箱即用!
MIT License
102 stars 11 forks source link

AttributeError: 'CountVectorizer' object has no attribute 'get_feature_names' #3

Closed ucas010 closed 3 months ago

ucas010 commented 1 year ago

Traceback (most recent call last): File "main.py", line 98, in main(algorithms[args.alg], args.data, args.topic_num, args.topk, args.alpha, args.lambda, args.window_size, File "/data//Chinese-Keyphrase-Extraction/utils.py", line 84, in wrapper results = fn(*args, **kwargs) File "main.py", line 72, in main data, tf_feature_names, topic_x_word_matrix, docx_x_topic_matrix = get_matrix(topic_num, data_path) File "/data//Chinese-Keyphrase-Extraction/lda.py", line 107, in get_matrix tf, tf_feature_names = get_vector(data) File "/data//Chinese-Keyphrase-Extraction/lda.py", line 80, in get_vector tf_feature_names = tf_vector.get_feature_names() AttributeError: 'CountVectorizer' object has no attribute 'get_feature_names'

ucas010 commented 1 year ago

only by running # python main.py --alg salience_rank --data ./data/data.xlsx --topic_num 10 --top_k 20 --alpha 0.2 --lambda_ 0.7 got up error

JackHCC commented 1 year ago

only by running # python main.py --alg salience_rank --data ./data/data.xlsx --topic_num 10 --top_k 20 --alpha 0.2 --lambda_ 0.7 got up error

see the FAQ of README