forked from ollana/IRProject
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
75 lines (66 loc) · 2.03 KB
/
Program.cs
File metadata and controls
75 lines (66 loc) · 2.03 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IRProject
{
class Program
{
/// <summary>
/// testtttttttttt
/// </summary>
/// <param name="args"></param>
static void Main(string[] args)
{
//System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
//stopwatch.Start();
//Console.WriteLine("Start testing ReadFile:");
//ReadFile rf = new ReadFile(@"D:\corpus");
//stopwatch.Stop();
//Console.WriteLine("All took " + (double)stopwatch.ElapsedMilliseconds / 60000 + " minutes");
//Console.ReadKey();
string path = @"d:\\olladi\\a.txt";
if (File.Exists(path))
{
using (StreamReader sr = new StreamReader(path))
{
string line = File.ReadLines(path).Skip(14).Take(1).First();
}
}
}
}
public class ProgramUI
{
public ProgramUI() { }
public object[] MainUI()
{
object[] obj;
System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
stopwatch.Start();
// try
// {
ReadFile rf = new ReadFile();
obj = new object [] {(double)stopwatch.ElapsedMilliseconds / 60000, rf.GetNumberOfDocuments() , rf.GetNumOfUniqeTerms()};
stopwatch.Stop();
return obj;
// }catch
// {
// return null;
// }
}
public bool Stemming
{
set { IRSettings.Default.Stemming = value; }
}
public string CorpusDestination
{
set { IRSettings.Default.Corpus = value; }
}
public string DictionaryDestination
{
set { IRSettings.Default.Destination = value; }
}
}
}