예제 #1
0
        public void TeachModel()
        {
            var topicGrouper = new TopicGrouper();
            var tops         = topicGrouper.GroupDocuments(new JsonDocumentSource(), 30);

            lock (locker)
            {
                topics = tops;
            }
        }
예제 #2
0
        static void Main()
        {
            var topicGrouper = new TopicGrouper();
            var topics       = topicGrouper.GroupDocuments(new JsonDocumentSource(), 20);

            for (int i = 0; i < topics.Count; i++)
            {
                Console.WriteLine($"Topic {i} - {topics[ i ].Documents.Count}");
                foreach (var document in topics[i].Documents.Take(5))
                {
                    Console.WriteLine($"    {document.Item1.Name} ({document.Item2*100:F}%)");
                }
            }

            Console.ReadLine();
        }