diff --git a/src/SIL.Machine.Morphology.HermitCrab/Allomorph.cs b/src/SIL.Machine.Morphology.HermitCrab/Allomorph.cs index 0c06cdf1..fbb32db7 100644 --- a/src/SIL.Machine.Morphology.HermitCrab/Allomorph.cs +++ b/src/SIL.Machine.Morphology.HermitCrab/Allomorph.cs @@ -72,6 +72,11 @@ public IDictionary Properties get { return _properties; } } + /// + /// Was this allomorph guessed by a lexical pattern? + /// + public bool Guessed { get; set; } + public bool FreeFluctuatesWith(Allomorph other) { if (this == other) diff --git a/src/SIL.Machine.Morphology.HermitCrab/Morpher.cs b/src/SIL.Machine.Morphology.HermitCrab/Morpher.cs index f617a02e..b0f37964 100644 --- a/src/SIL.Machine.Morphology.HermitCrab/Morpher.cs +++ b/src/SIL.Machine.Morphology.HermitCrab/Morpher.cs @@ -367,7 +367,9 @@ private IEnumerable LexicalGuess(Word input) IEnumerable shapeNodes = input.Shape.GetNodes(input.Range); foreach (RootAllomorph lexicalPattern in _lexicalPatterns) { - IEnumerable shapePattern = lexicalPattern.Segments.Shape.GetNodes(lexicalPattern.Segments.Shape.Range); + IEnumerable shapePattern = lexicalPattern.Segments.Shape.GetNodes( + lexicalPattern.Segments.Shape.Range + ); foreach (List match in MatchNodesWithPattern(shapeNodes.ToList(), shapePattern.ToList())) { // Create a root allomorph for the guess. diff --git a/src/SIL.Machine.Morphology.HermitCrab/RootAllomorph.cs b/src/SIL.Machine.Morphology.HermitCrab/RootAllomorph.cs index 5bb1a571..3caba1af 100644 --- a/src/SIL.Machine.Morphology.HermitCrab/RootAllomorph.cs +++ b/src/SIL.Machine.Morphology.HermitCrab/RootAllomorph.cs @@ -34,11 +34,6 @@ public Segments Segments /// public bool IsPattern { get; set; } - /// - /// Was this allomorph guessed by a lexical pattern? - /// - public bool Guessed { get; set; } - protected override bool ConstraintsEqual(Allomorph other) { if (!(other is RootAllomorph otherAllo)) diff --git a/tests/SIL.Machine.Morphology.HermitCrab.Tests/MorpherTests.cs b/tests/SIL.Machine.Morphology.HermitCrab.Tests/MorpherTests.cs index 48a8e617..bb22184b 100644 --- a/tests/SIL.Machine.Morphology.HermitCrab.Tests/MorpherTests.cs +++ b/tests/SIL.Machine.Morphology.HermitCrab.Tests/MorpherTests.cs @@ -91,7 +91,7 @@ public void AnalyzeWord_CanGuess_ReturnsCorrectAnalysis() node.Annotation.Iterative = true; var shape = new Shape(begin => new ShapeNode( begin ? HCFeatureSystem.LeftSideAnchor : HCFeatureSystem.RightSideAnchor - )); + )); shape.AddRange(new List { node }); var lexicalPattern = new RootAllomorph(new Segments(Table1, "", shape));