Search code examples
javajsonmahout

Mahout using other data (ratings) sources than a txt file or database


Is there any way to pass a JSON feed into the Mahout recommender? So far the DataModel's present in Mahout can take a text file or read a table from a database to obtain the ratings and items for a user. However, I would like to link Mahout to a JSON feed (or submit a link to a Google doc) where ratings are continuously changing. I do not want to link Mahout to a database.

Is there any way to do this? I googled for it but the authority on the web seem to suggest that the only way to pass in ratings and items is either through a txt file or database. I would appreciate greatly a workaround for this.


Solution

  • There isn't any such pre-built DataModel provided by Mahout, which can read from JSON. The ones currently available can be found here

    You can implement your own DataModel. Have a look at FileDataModel and MongoDBDataModel