[API] - Content Recommendation

Go back to Resources


This API generates a list of related contents based on an initial entry (document list)

Usage Example

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using Toth.Core.Clustering;
using Toth.Core.Model;

namespace TestApp
    class Program
        static void Main(string[] args)
            var lista = Toth.Extension.Encena.Artigo.SelectAll();

            IList documents = new List();

            //here you might fill your list

			Toth.ContentRecommendation.Recommendation cRec = new Toth.ContentRecommendation.Recommendation(documents, false, false, true);

			Console.Write("Choose a document (id): ");

            int id = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Document: " + documents.First(o => o.Id == id).Title);

            foreach (var item in cRec.GetDocuments(id))
                Console.WriteLine("Related Document: " + item.Title);

Minimum Requirements

.NET Framework 4.5