From 21e9d475d7430635ba3655479e8eed893a0ddf9e Mon Sep 17 00:00:00 2001 From: Faiq Adzlan <88019612+wanadzhar913@users.noreply.github.com> Date: Fri, 26 Jul 2024 16:42:17 +0800 Subject: [PATCH] `vectorizer.get_feature_names` method update due to `scikit-learn>=1.2` --- malaya/topic_model/decomposition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/malaya/topic_model/decomposition.py b/malaya/topic_model/decomposition.py index eddd94cf..dfdac54a 100644 --- a/malaya/topic_model/decomposition.py +++ b/malaya/topic_model/decomposition.py @@ -178,7 +178,7 @@ def fit( corpus[i] = cleaning(corpus[i]) tf = vectorizer.fit_transform(corpus) - tf_features = vectorizer.get_feature_names() + tf_features = vectorizer.get_feature_names_out() compose = model(n_topics).fit(tf) return Topic( tf_features, compose, corpus, compose.transform(tf), vectorizer, tf