Пример #1
0
        private static void TestRecTagBasedBookSimilarity(List <int> bookIds)
        {
            List <Recommendation> recommendationsRTBBS = new List <Recommendation>();
            String comment = "userId=null";

            foreach (int bookIdI in bookIds)
            {
                List <int> recommendationListI = RecommenderTagBasedBookSimilarity.Recommend(bookIdI, null, HOW_MANY_REC);

                Recommendation recommendationI = new Recommendation(bookIdI, recommendationListI);

                recommendationsRTBBS.Add(recommendationI);
                System.Console.WriteLine(recommendationI.exportAsString());
            }

            String fileName = "RecommenderTagBasedBookSimilarity.rec";

            ExportsRecommendationsToFile(recommendationsRTBBS, comment, fileName);
        }
Пример #2
0
 public static List <int> RecommendBookSimilarByTags(int bookId, string userId = null, int howMany = 6)
 {
     return(RecommenderTagBasedBookSimilarity.Recommend(bookId, userId, howMany));
 }