是否有类似sklearn的golang库可用于查找tf-idf?我似乎找不到任何记录良好的东西。我希望找到tf-idf给出一堆文本文件,类似于提到的python版本here
from sklearn.feature_extraction.text import TfidfVectorizer
import numpy as np
from scipy.sparse.csr import csr_matrix #need this if you want to save tfidf_matrix
tf = TfidfVectorizer(input='filename', analyzer='word', ngram_range=(1,6),
min_df = 0, stop_words = 'english', sublinear_tf=True)
tfidf_matrix = tf.fit_transform(corpus)