![]() ![]() ![]() Self.query_vec = cosinus_sparse(i, j):ĭen = math.sqrt(spars) * math.sqrt(sum(j * j))Ĭc = "ĩ2 raise NotImplementedError(msg.format(inst.opname, inst. Self.n_docs, self.n_terms = rpus_vectorized.shape Raise MethodError('Method provided is not valid') Self.bag_of_word = TfidfVectorizer(stop_words=self.stop_words, rpus_vectorized = self.bag_of_word.fit_transform(rpus) Self.bag_of_word = CountVectorizer(stop_words=self.stop_words, ASR1002-RP1 platform with 4194303 Kbytes of main memory. ![]() Self.features_names = self.bag_of_word.get_feature_names() Rebooted device while console connection was on with the following: Warning: disabling ROMVAR writes, pending ROMMON update. Although I added the decorator before each method I have this implementation error that appears.įrom sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizerĭef _init_(self, corpus, method='XTERM', stop_words='english', max_df=1.0, min_df=1, max_features=None): This class method I use in the search class method, then I call search in the results method. What I want to do is to compute the cosine similarity with a cosinus_sparse function. I try to launch a code with Numba and I get errors. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |