Example usage for org.apache.mahout.cf.taste.impl.recommender NullRescorer getUserInstance

List of usage examples for org.apache.mahout.cf.taste.impl.recommender NullRescorer getUserInstance

Introduction

In this page you can find the example usage for org.apache.mahout.cf.taste.impl.recommender NullRescorer getUserInstance.

Prototype

public static IDRescorer getUserInstance() 

Source Link

Usage

From source file:org.zaizi.mahout.alfresco.recommender.AbstractAlfrescoRecommendationService.java

License:Open Source License

public List<NodeRef> getRecommendations(int numResults) throws TasteException {
    String username = AuthenticationUtil.getFullyAuthenticatedUser();
    long userId = ZaiziAlfrescoServiceUtil.getUserId(username);

    List<NodeRef> nodeRefs = null;
    try {/*from w w  w  .j  a v a2  s  . c  o m*/
        nodeRefs = getRecommendationService().getRecommendations(userId, numResults,
                NullRescorer.getUserInstance());
    } catch (TasteException e) {
        getLogger().error("Error obtaining recommendations: " + e.getMessage(), e);
        throw e;
    }
    return nodeRefs;
}