Chinese-Keyphrase-Extraction icon indicating copy to clipboard operation
Chinese-Keyphrase-Extraction copied to clipboard

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

Open ucas010 opened this issue 2 years ago • 2 comments

Traceback (most recent call last): File "main.py", line 98, in main(algorithms[args.alg], args.data, args.topic_num, args.top_k, 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 avatar Dec 30 '22 12:12 ucas010

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

ucas010 avatar Dec 30 '22 12:12 ucas010

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

JackHCC avatar Jul 16 '23 06:07 JackHCC