Closed ucas010 closed 3 months 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
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
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'