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

后端 未结 3 842
臣服心动
臣服心动 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.

提交回复
热议问题