public void TeachModel() { var topicGrouper = new TopicGrouper(); var tops = topicGrouper.GroupDocuments(new JsonDocumentSource(), 30); lock (locker) { topics = tops; } }
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(); }