How can I get the most popular words in a table via mysql?

后端 未结 3 1782
旧时难觅i
旧时难觅i 2021-01-20 09:51

I\'ve got a table with a BLOB column. What I want to do is get it to be able to pick out words and list them in order.

For example if it contained:

  • Bob
3条回答
  •  别那么骄傲
    2021-01-20 10:08

    Sphinx Search (http://sphinxsearch.com/) is a application that does a lot around searching full text in mysql as well as other db's and file formats. In short, it offers search with relavence of mysql tables.

    One of it's tools performs word counts, the following is a bash script to get it to output the most popular words in a database:

    GET_TOP_X_STOP_WORDS=27
    WORD_FREQ_FILE=~/wordfreq.txt
    /usr/local/bin/indexer test1 --buildstops $WORD_FREQ_FILE $GET_TOP_X_STOP_WORDS --buildfreqs
    

提交回复
热议问题