by Zaizi Blogs September 24th, 2014
In this era where digital information has become the main source of knowledge across the globe, Alfresco has a relevant role to play as it manages huge volumes of data for companies and users.  
 
Despite the services provided by Alfresco to ease and organise your repository, data volume is so high that not only will you not know where to find documentation but also whether that documentation even exists.  At this point, a little help from your own repository is more than welcome. 
 
Machine Learning strategy turns into an ideal approach to manage these situations. Where users can benefit from both personal and similar users’ preferences to get automated recommendations in order to decrease the amount of time find what they may be interested in.
 
This kind of situation is where Apache Mahout comes into play. Mahout is a project of the Apache Software Foundation that implements multiple algorithms mainly focused on the areas of collaboration and classification.
 
As Alfresco integrators we can really feel the value of a Mahout integration within Alfresco, giving users the ability to recommend any document whilst offering them the best documents based on their recommendations. Mahout offers different classification/recommendation algorithms out of the box. Our integration uses the “logLikelihoodSimilarity” as the default algorithm but you can customise it and use the best algorithm according to your needs.
 
The recommendation approach we are exploring is based on user likes, moreover it is related to a 5star classification scheme, where 5 stars is the maximum you can give, and 0 stars the minimum.
 
To perform the vote, we have used the Fivestar Ratings Widget for Alfresco Share from Jeff Potts, adapting it to work with Alfresco 4.x. 
 
You can find Jeff Potts code in google code. https://code.google.com/p/alfresco-fivestar-ratings/
 

How it works

 
Go to your local alfresco repository and create a folder, in this example it’s called "FiveStars".

Create a new rule with the parameters that you can see in the screenshot. 

Upload some documents in the folder.

Create some users to vote the documents. For instance, the following table shows a set of users and the number of votes of each document.
The result should be something like this. 
When users vote documents, recommendation algorithms run in background and provide users with recommended documents based on those they like. These documents are displayed in a simple but useful dashlet for recommended document, which should look like this:

Based on those ratings, these are the documents suggested to every user through “Recommended documents” dashlet 

The source code is now available to download for free here: https://github.com/zaizi/alfresco-recommendations

If you want to know more in both technical and end users aspects, we'll be doing a talk soon with a live demo. Join Zaizi on the next web talk and learn how Alfresco learns from the user experience within the repository to offer them recommended content based of the content they read, create or like.

 
Zaizi Blogs's picture
about the author: Zaizi Blogs
We know how to build world-class user-centred services, quickly and efficiently and have a proven delivery record in helping organisations put services online. Our blogs focus on the latest trends in technology and digital transformation happening in the public sector and financial services industry.