-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTest.cs
More file actions
26 lines (23 loc) · 820 Bytes
/
Test.cs
File metadata and controls
26 lines (23 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System.Diagnostics;
using MyStem;
public static class Test
{
public static void Main()
{
FastMyStem stem = new(new() { PrintOnlyLemmasAndGrammemes = true });
List<string> inputs = new List<string>() {"Двигатель башни колонки", "!!!!", "Тестовъ три", "Тестовых восемь тысяч", "Где деньги Либовский?"};
for (int i = 0; i < 100000; i++)
{
inputs.Add(i.ToString());
}
Stopwatch stopwatch = Stopwatch.StartNew();
foreach (var input in inputs)
{
var result = stem.MultiAnalysis(input);
Console.WriteLine($"{input} -> {result}");
}
stopwatch.Stop();
Console.WriteLine($"Time: {stopwatch.ElapsedMilliseconds} ms");
Console.WriteLine($"Total memory: {Process.GetCurrentProcess().WorkingSet64 / 1024 / 1024} MB");
}
}