Re:Show HN: HuggingFace – Fast tokenization library for deep...
by ogrisel on Monday January 13, 2020 @02:13PM
(#22037549)
Big transformers neural network are probably overkill for topic modeling. More traditional methods implemented in Gensim or scikit learn such as tfidf vectors followed by SVD (aka LSI) or LDA or NMF are probably just fine to extract topics (soft clustering).
[ Parent
| on HN ]
Re:Show HN: HuggingFace – Fast tokenization library for deep...
by ogrisel on Monday January 13, 2020 @02:17PM
(#22037579)
The reason is that you do not need to finely understand the structure of individual sentences to group documents by similar topics. Word order does not matter much for this task. Hence the success of methods that use Bag of Words (eg TFIDF) as their input representation.
Re:Show HN: HuggingFace – Fast tokenization library for deep...
by orestis on Monday January 13, 2020 @02:56PM
(#22037960)
It might be that the corpus I was trying to cluster needs better preprocessing, or perhaps better n-grams. Using Bigrams only I saw a lot of common words that were meaningless, but adding them as stop words made the results worse. Hence my wondering if some other vectorization would produce better results.
On a related note, as a newcomer just trying to get things done (i.e. applied NLP) I find the whole ecosystem great but frustrating, so many frameworks and libraries but not clear ways to compose them together. Any resources out there that help make a sense of things?
Re:Show HN: HuggingFace – Fast tokenization library for deep...
by nestorD on Monday January 13, 2020 @05:43PM
(#22039581)
If I understand you problem clearly, you can use TFIDF to reduce the weight of meaningless words.
Re:Show HN: HuggingFace – Fast tokenization library for deep...
by orestis on Monday January 13, 2020 @09:22PM
(#22041219)
It’s not meaningless words - it’s common English words that are overloaded and I think considering their position in sentences instead would give better results.
I haven’t yet tried TFIDF though so I’ll see what that will do.
Re:Show HN: HuggingFace – Fast tokenization library for deep...
by oddnearfuture on Monday January 13, 2020 @11:26PM
(#22041841)
With the appropriate amount of data of course.