What is the easiest way to implement terms association mining in Solr?

后端 未结 3 843
臣服心动
臣服心动 2021-02-05 20:57

Association mining seems to give good results for retrieving related terms in text corpora. There are several works on this topic including wel

相关标签:
3条回答
  • 2021-02-05 21:32

    Since there are still no answers to my questions, I have to write my own thoughts and accept it. Nevertheless, if someone propose better solution, I'll happily accept it instead of mine.

    I'll go with co-occurrence matrix, since it is the most principal part of association mining. In general, Solr provides all needed functions for building this matrix in some way, though they are not as efficient as direct access with Lucene. To construct matrix we need:

    1. All terms or at least the most frequent ones, because rare terms won't affect result of association mining by their nature.
    2. Documents where these terms occur, again, at least top documents.

    Both these tasks may be easily done with standard Solr components.

    To retrieve terms TermsComponent or faceted search may be used. We can get only top terms (by default) or all terms (by setting max number of terms to take, see documentation of particular feature for details).

    Getting documents with the term in question is simply search for this term. The weak point here is that we need 1 request per term, and there may be thousands of terms. Another weak point is that neither simple, nor faceted search do not provide information about the count of occurrences of the current term in found document.

    Having this, it is easy to build co-occurrence matrix. To mine association it is possible to use other software like Weka or write own implementation of, say, Apriori algorithm.

    0 讨论(0)
  • 2021-02-05 21:40

    You can export a Lucene (or Solr) index to Mahout, and then use Latent Dirichlet Allocation. If LDA is not close enough to LSA for your needs, you can just take the correlation matrix from Mahout, and then use Mahout to take the singular value decomposition.

    I don't know of any LSA components for Solr.

    0 讨论(0)
  • 2021-02-05 21:53

    You can get the count of occurrences of the current term in found document in the following query:

    http://ip:port/solr/someinstance/select?defType=func&fl=termfreq(field,xxx),*&fq={!frange l=1}termfreq(field,xxx)&indent=on&q=termfreq(field,xxx)&sort=termfreq(field,xxx) desc&wt=json
    
    0 讨论(0)
提交回复
热议问题