[API] - Tag Recommendation

Go back to Resources

Overview

This API identify and recommends relevant keywords for a given document

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.TagRecommendation.Recommendation tRec = new Toth.TagRecommendation.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 tRec.GetTags(id))
            {
                Console.WriteLine("Recommended Tag: " + item);
            }
        }
    }
}

Minimum Requirements

.NET Framework 4.5

Download

TagRecommendationAPI.zip