-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDictionary.cs
More file actions
68 lines (47 loc) · 2.17 KB
/
Dictionary.cs
File metadata and controls
68 lines (47 loc) · 2.17 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
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace WeightedDictionary
{
internal class DictionaryMetaObject
{
public string DictionaryName { get; set; }
public string DictionaryCategoryPrefix { get; set; }
public string DictionaryDescription { get; set; }
public string DictionaryRawText { get; set; }
public bool UseDictionary { get; set; }
public DictionaryData DictData { get; set; }
public DictionaryMetaObject(string DictName, string DictDescript, string DictPrefix, string DictContents, bool useDict = true)
{
DictionaryName = DictName;
DictionaryDescription = DictDescript;
DictionaryRawText = DictContents;
DictionaryCategoryPrefix = DictPrefix;
UseDictionary = useDict;
DictData = new DictionaryData();
}
}
public class DictionaryData
{
public int NumCats { get; set; }
public int MaxWords { get; set; }
public string totalNumberOfMatchesDictName { get; set; }
public string[] CatNames { get; set; }
//yeah, we're going full inception with this variable. dictionary inside of a dictionary inside of a dictionary
//while it might seem unnecessarily complicated (and it might be), it makes sense.
//the first level simply differentiates the wildcard entries from the non-wildcard entries
//The second level is purely to refer to the word length -- does each sub-entry include 1-word entries, 2-word entries, etc?
//the third level contains the actual entries from the user's dictionary file
public double[] InterceptWeights { get; set; }
public Dictionary<int, Dictionary<string, double[]>> FullDictionary { get; set; }
public bool DictionaryLoaded { get; set; }
public DictionaryData()
{
NumCats = 0;
MaxWords = 0;
CatNames = new string[] { };
InterceptWeights = new double[0];
FullDictionary = new Dictionary<int, Dictionary<string, double[]>>();
DictionaryLoaded = false;
}
}
}