static void NN(string[] args) { var k = 0; if (args.Length == 2) { k = 10; } else if (args.Length == 3) { k = int.Parse(args[2]); } else { PrintNNUsage(); Environment.Exit(-1); } var fasttext = new FastText(); fasttext.LoadModel(args[1]); const string prompt = "Query word? "; Console.Write(prompt); while (Console.In.Peek() != -1) { var queryWord = Console.ReadLine(); PrintPredictions(fasttext.GetNN(queryWord, k), true, true); Console.Write(prompt); } }