-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathHCFeatureSystem.cs
More file actions
97 lines (76 loc) · 3.76 KB
/
HCFeatureSystem.cs
File metadata and controls
97 lines (76 loc) · 3.76 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
using System;
using SIL.Machine.FeatureModel;
namespace SIL.Machine.Morphology.HermitCrab
{
public class HCFeatureSystem : FeatureSystem
{
public static readonly SymbolicFeature Type;
public static readonly FeatureSymbol Anchor;
public static readonly FeatureSymbol Segment;
public static readonly FeatureSymbol Boundary;
public static readonly FeatureSymbol Morph;
public static readonly SymbolicFeature Modified;
public static readonly FeatureSymbol Dirty;
public static readonly FeatureSymbol Clean;
public static readonly SymbolicFeature AnchorType;
public static readonly FeatureSymbol LeftSide;
public static readonly FeatureSymbol RightSide;
public static readonly SymbolicFeature Deletion;
public static readonly FeatureSymbol Deleted;
public static readonly FeatureSymbol NotDeleted;
public static readonly StringFeature StrRep;
public static readonly StringFeature Allomorph;
public static readonly StringFeature MorphID;
public static readonly HCFeatureSystem Instance;
public static readonly FeatureStruct LeftSideAnchor;
public static readonly FeatureStruct RightSideAnchor;
static HCFeatureSystem()
{
Anchor = new FeatureSymbol(Guid.NewGuid().ToString()) { Description = "anchor" };
Segment = new FeatureSymbol(Guid.NewGuid().ToString()) { Description = "segment" };
Boundary = new FeatureSymbol(Guid.NewGuid().ToString()) { Description = "boundary" };
Morph = new FeatureSymbol(Guid.NewGuid().ToString()) { Description = "morph" };
Type = new SymbolicFeature(Guid.NewGuid().ToString(), Anchor, Segment, Boundary, Morph)
{
Description = "Type",
};
Dirty = new FeatureSymbol(Guid.NewGuid().ToString()) { Description = "Dirty" };
Clean = new FeatureSymbol(Guid.NewGuid().ToString()) { Description = "Clean" };
Modified = new SymbolicFeature(Guid.NewGuid().ToString(), Dirty, Clean)
{
Description = "Modified",
DefaultValue = new SymbolicFeatureValue(Clean),
};
Deleted = new FeatureSymbol(Guid.NewGuid().ToString()) { Description = "Deleted" };
NotDeleted = new FeatureSymbol(Guid.NewGuid().ToString()) { Description = "NotDeleted" };
Deletion = new SymbolicFeature(Guid.NewGuid().ToString(), Deleted, NotDeleted)
{
Description = "Deletion",
DefaultValue = new SymbolicFeatureValue(NotDeleted),
};
LeftSide = new FeatureSymbol(Guid.NewGuid().ToString()) { Description = "LeftSide" };
RightSide = new FeatureSymbol(Guid.NewGuid().ToString()) { Description = "RightSide" };
AnchorType = new SymbolicFeature(Guid.NewGuid().ToString(), LeftSide, RightSide)
{
Description = "AnchorType",
};
StrRep = new StringFeature(Guid.NewGuid().ToString()) { Description = "StrRep" };
Allomorph = new StringFeature(Guid.NewGuid().ToString()) { Description = "Allomorph" };
MorphID = new StringFeature(Guid.NewGuid().ToString()) { Description = "ID" };
Instance = new HCFeatureSystem();
LeftSideAnchor = FeatureStruct.New().Symbol(Anchor).Symbol(LeftSide).Value;
RightSideAnchor = FeatureStruct.New().Symbol(Anchor).Symbol(RightSide).Value;
}
private HCFeatureSystem()
{
Add(Type);
Add(Modified);
Add(Deletion);
Add(AnchorType);
Add(StrRep);
Add(Allomorph);
Add(MorphID);
Freeze();
}
}
}