This is a variation on the usual {@link org.apache.mahout.cf.taste.recommender.ItemBasedRecommender}from Mahout (which uses {@code long} values to identify users and items) that instead uses {@link String}as keys. Implementations of this interface perform the same functions, but internally translate from instances of type {@link String} to {@code long} and back. In particular, {@link String}s are hashed to {@code long} values using MD5, and the reverse mapping is stored locally for a reverse translation.
To do this, the client must be aware of all item IDs that may be returned. It will receive a hashed value from the Serving Layer, and must have been initialized with {@link #addItemIDs(Iterable)} or{@link #addItemIDs(File)} first in order to perform the reverse translation. Otherwise the returned item IDswill be (string representations of) the hashed value only.
@author Sean Owen @since 1.0
|
|