Better text documents clustering than tf/idf and cosine similarity?

后端 未结 3 405
走了就别回头了
走了就别回头了 2021-02-01 06:56

I\'m trying to cluster the Twitter stream. I want to put each tweet to a cluster that talk about the same topic. I tried to cluster the stream using an online clustering algorit

相关标签:
3条回答
  • 2021-02-01 07:16

    As mentioned in other comments and answers. Using LDA can give good tweet->topic weights.

    If these weights are insufficient clustering for your needs you could look at clustering these topic distributions using a clustering algorithm.

    While it is training set dependent LDA could easily bundle tweets with stackoverflow, stack-overflow and stack overflow into the same topic. However "my stack of boxes is about to overflow" might instead go into another topic about boxes.

    Another example: A tweet with the word Apple could go into a number of different topics (the company, the fruit, New York and others). LDA would look at the other words in the tweet to determine the applicable topics.

    1. "Steve Jobs was the CEO at Apple" is clearly about the company
    2. "I'm eating the most delicious apple" is clearly about the fruit
    3. "I'm going to the big apple when I travel to the USA" is most likely about visiting New York
    0 讨论(0)
  • 2021-02-01 07:25

    In my experience, cosine similarity on latent semantic analysis (LSA/LSI) vectors works a lot better than raw tf-idf for text clustering, though I admit I haven't tried it on Twitter data. In particular, it tends to take care of the sparsity problem that you're encountering, where the documents just don't contain enough common terms.

    Topic models such as LDA might work even better.

    0 讨论(0)
  • 2021-02-01 07:36

    Long answer:

    TfxIdf is currently one of the most famous search method. What you need are some preprocessing from Natural Langage Processing (NLP). There is a lot of resources that can help you for english (for example the lib 'nltk' in python).

    You must use the NLP analysis both on your querys (questions) and on yours documents before indexing.

    The point is : while tfxidf (or tfxidf^2 like in lucene) is good, you should use it on annotated resource with meta-linguistics information. That can be hard and require extensive knowledge about your core search engine, grammar analysis (syntax) and the domain of document.

    Short answer : The better technique is to use TFxIDF with light grammar NLP annotations, and both re-write query and indexing.

    0 讨论(0)
提交回复
热议问题