2

I'm integrating Solr for my new PHP application.

As I'm newbie in solr section, I want to know that is it possible to generate some useful tags for every content pages through solr? something like auto-tagging mechanism.

Thanks in Advance...

P.S My contents available in both Persian and English languages.

1

2 Answers 2

2

something like auto-tagging mechanism.

Yes, you can build something like that.

There are 2 different ways to realize that:

  1. Use the Clustering Component from Solr to build groups of docs and label those docs by solr. The labels are something like the taggs your are looking for.
  2. Realize a tagging by using the MLT feature.

I started an auto-tagging project with the 1.) method with medium success. Finding labels for a cluster of documents is an hard process.
But fortunately, I had some already taggegd documents. If you also have some documents with valid tags, than you can use the 2.) method to use those document as an base to start learning:

Take a document without tags and perform a MLT search against docs with tags. Take the tags from the docs you fond and count them. Depending on the count, apply one or more tags to the untaggegd document. In my case, that works very well. Method 2.) is an cheep implementation of machine based learning, but you will get 95% success with only 5% Work-input.

3
  • I'm really interest to see the first way in the action, Do you have any example about this feature?
    – Ali
    Oct 21, 2014 at 12:47
  • Thanks a lot, I tried to enable clustering into my solr application but the clustering system does not show any tags on query with which directed to one result!
    – Ali
    Oct 24, 2014 at 20:58
  • 1
    @NullPointer Sorry, but does not show any tags is not a valid error description. ;-) If you have decided for the 1.) method, it's probably an good idea to start an new SO question with config details and an detailed description what you get and what you wold like to have. To get familiar with carrot to, I recommend you to download and use the carrot2 workbench. project.carrot2.org/download.html this is very helpful to learn about carrot2 configuration.
    – The Bndr
    Oct 27, 2014 at 7:31
1

As it's a PHP application, if it's OK for you to generate tags in php and then inserting/updating to Solr, Here are few options -

  • If using a web service is OK, check Yahoo's Term Extractor
  • If you can/want to host a term extraction service yourself to (may be in local server), check FiveFilters
  • Here is a php function for extracting valuable words from text block. Surely not as efficient as Yahoo Term Extractor, but it may work for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.