Repository navigation
Expand file tree
/
Copy pathConfigManager.cs
More file actions
63 lines (53 loc) · 1.59 KB
/
Copy pathConfigManager.cs
File metadata and controls
63 lines (53 loc) · 1.59 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
using System;
using System.IO;
namespace JiebaNet.Segmenter
{
public class ConfigManager
{
public static string ConfigFileBaseDir
{
get
{
string path = String.Empty;
var dir = AppDomain.CurrentDomain.GetData("JiebaConfigFileDir");
if (dir == null)
{
path = "Resources";
}
else
{
path = Path.Combine(dir.ToString(), "Resources");
}
return path;
}
}
public static string MainDictFile
{
get { return Path.Combine(ConfigFileBaseDir, "dict.txt"); }
}
public static string ProbTransFile
{
get { return Path.Combine(ConfigFileBaseDir, "prob_trans.json"); }
}
public static string ProbEmitFile
{
get { return Path.Combine(ConfigFileBaseDir, "prob_emit.json"); }
}
public static string PosProbStartFile
{
get { return Path.Combine(ConfigFileBaseDir, "pos_prob_start.json"); }
}
public static string PosProbTransFile
{
get { return Path.Combine(ConfigFileBaseDir, "pos_prob_trans.json"); }
}
public static string PosProbEmitFile
{
get { return Path.Combine(ConfigFileBaseDir, "pos_prob_emit.json"); }
}
public static string CharStateTabFile
{
get { return Path.Combine(ConfigFileBaseDir, "char_state_tab.json"); }
}
}
}