diff --git a/TestProcessing-1/Program.cs b/TestProcessing-1/Program.cs index 696b14e..f5a4282 100644 --- a/TestProcessing-1/Program.cs +++ b/TestProcessing-1/Program.cs @@ -1,43 +1,57 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; +using System.Text.RegularExpressions; using System.Threading.Tasks; namespace TestProcessing_1 { internal class Program { + // Main entry point: asks for a filename, reads the file, counts word occurrences, and prints results. static void Main(string[] args) { - Console.WriteLine("gimmefile"); - var z = Console.ReadLine(); - var q = File.ReadAllLines(z); - Dictionary a = new Dictionary(); - for (int i=0; i wordCounts = new Dictionary(); + for (int i = 0; i < lines.Length; i++) { - var s = Regex.Replace(q[i],@"[^\w\s]", "").ToLower(); - var t = s.Split(' '); - for (int j=0;j