Is there any golang library similar to sklearn that can be used to find tf-idf? I can't seem to find anything well documented. I am looking to find the tf-idf given a bunch of text file, similar to the python version mentioned 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)
TD-IDF is a relatively simple text feature representation method.
So I think that you can easily reason about it against the source code.
Have a try on this module