Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unsupervised automatic tagging algorithms?

I want to build a web application that lets users upload documents, videos, images, music, and then give them an ability to search them. Think of it as Dropbox + Semantic Search.

When user uploads a new file, e.g. Document1.docx, how could I automatically generate tags based on the content of the file? In other words no user input is needed to determine what the file is about. If suppose that Document1.docx is a research paper on data mining, then when user searches for data mining, or research paper, or document1, that file should be returned in search results, since data mining and research paper will most likely be potential auto-generated tags for that given document.

1. Which algorithms would you recommend for this problem?

2. Is there an natural language library that could do this for me?

3. Which machine learning techniques should I look into to improve tagging precision?

4. How could I extend this to video and image automatic tagging?

Thanks in advance!

like image 659
Sahat Yalkabov Avatar asked Mar 13 '13 04:03

Sahat Yalkabov


4 Answers

The most common unsupervised machine learning model for this type of task is Latent Dirichlet Allocation (LDA). This model automatically infers a collection of topics over a corpus of documents based on the words in those documents. Running LDA on your set of documents would assign words with probability to certain topics when you search for them, and then you could retrieve the documents with the highest probabilities to be relevant to that word.

There have been some extensions to images and music as well, see http://cseweb.ucsd.edu/~dhu/docs/research_exam09.pdf.

LDA has several efficient implementations in several languages:

  • many implementations from the original researchers
  • http://mallet.cs.umass.edu/, written in Java and recommended by others on SO
  • PLDA: a fast, parallelized C++ implementation
like image 57
Andrew Mao Avatar answered Nov 20 '22 08:11

Andrew Mao


These guys propose an alternative to LDA.

Automatic Tag Recommendation Algorithms for Social Recommender Systems http://research.microsoft.com/pubs/79896/tagging.pdf

Haven't read thru the whole paper but they have two algorithms:

  1. Supervised learning version. This isn't that bad. You can use Wikipedia to train the algorithm
  2. "Prototype" version. Haven't had a chance to go thru this but this is what they recommend

UPDATE: I've researched this some more and I've found another approach. Basically, it's a two-stage approach that's very simple to understand and implement. While too slow for 100,000s of documents, it (probably) has good performance for 1000s of docs (so it's perfect for tagging a single user's documents). I'm going to try this approach and will report back on performance/usability.

In the mean time, here's the approach:

  1. Use TextRank as per http://qr.ae/36RAP to generate a tag list for a single document. This generates a tag list for a single document independent of other documents.
  2. Use the algorithm from "Using Machine Learning to Support Continuous Ontology Development" (https://www.researchgate.net/publication/221630712_Using_Machine_Learning_to_Support_Continuous_Ontology_Development) to integrate the tag list (from step 1) into the existing tag list.
like image 38
U Avalos Avatar answered Nov 20 '22 08:11

U Avalos


Text documents can be tagged using this keyphrase extraction algorithm/package. http://www.nzdl.org/Kea/ Currently it supports limited type of documents (Agricultural and medical I guess) but you can train it according to your requirements.

I'm not sure how would the image/video part work out, unless you're doing very accurate object detection (which has it's own shortcomings). How are you planning to do it ?

like image 28
user3675152 Avatar answered Nov 20 '22 06:11

user3675152


You want Doc-Tags (https://www.Doc-Tags.com) which is a commercial product that automatically and Unsupervised - generates Contextually Accurate Document Tags. The built-in Reporting functionality makes the product a light-weight document management system.

For Developers wanting to customize their own approach - the source code is available (very cheap) and the back-end service xAIgent (https://xAIgent.com) is very inexpensive to use.

like image 1
Rod Miller Avatar answered Nov 20 '22 08:11

Rod Miller