本文整理汇总了C#中TestEnvironment.UpdateCognacy方法的典型用法代码示例。如果您正苦于以下问题:C# TestEnvironment.UpdateCognacy方法的具体用法?C# TestEnvironment.UpdateCognacy怎么用?C# TestEnvironment.UpdateCognacy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestEnvironment
的用法示例。
在下文中一共展示了TestEnvironment.UpdateCognacy方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateCognacy_NoSimilarSegments
public void UpdateCognacy_NoSimilarSegments()
{
var env = new TestEnvironment("hɛ.lo", "he.ɬa");
env.UpdateCognacy();
Assert.That(env.WordPair.PredictedCognacy, Is.False);
Assert.That(env.WordPair.AlignmentNotes, Is.EqualTo(new[] {"1", "2", "3", "2"}));
}
示例2: UpdateCognacy_RegularConsonantEqual
public void UpdateCognacy_RegularConsonantEqual()
{
var env = new TestEnvironment("hɛ.lo", "he.ɬa", regularConsEqual: true);
env.VarietyPair.CognateSoundCorrespondenceFrequencyDistribution[new SoundContext(env.SegmentPool.GetExisting("l"))].Increment(env.SegmentPool.GetExisting("ɬ"), 3);
env.UpdateCognacy();
Assert.That(env.WordPair.PredictedCognacy, Is.True);
Assert.That(env.WordPair.AlignmentNotes, Is.EqualTo(new[] {"1", "2", "1", "2"}));
}
示例3: UpdateCognacy_IgnoreRegularInsertionDeletion
public void UpdateCognacy_IgnoreRegularInsertionDeletion()
{
var env = new TestEnvironment("hɛ.lo", "he.l", true);
env.VarietyPair.CognateSoundCorrespondenceFrequencyDistribution[new SoundContext(env.SegmentPool.GetExisting("o"))].Increment(new Ngram<Segment>(), 3);
env.UpdateCognacy();
Assert.That(env.WordPair.PredictedCognacy, Is.True);
Assert.That(env.WordPair.AlignmentNotes, Is.EqualTo(new[] {"1", "2", "1", "-"}));
}
示例4: UpdateCognacy_SimilarRegularConsonant
public void UpdateCognacy_SimilarRegularConsonant()
{
var env = new TestEnvironment("hɛ.lo", "he.ɬa");
env.CognateIdentifier.SimilarSegments.IsMapped(Arg.Any<ShapeNode>(), env.SegmentPool.GetExisting("l"), Arg.Any<ShapeNode>(), Arg.Any<ShapeNode>(),
env.SegmentPool.GetExisting("ɬ"), Arg.Any<ShapeNode>()).Returns(true);
env.VarietyPair.CognateSoundCorrespondenceFrequencyDistribution[new SoundContext(env.SegmentPool.GetExisting("l"))].Increment(env.SegmentPool.GetExisting("ɬ"), 3);
env.UpdateCognacy();
Assert.That(env.WordPair.PredictedCognacy, Is.True);
Assert.That(env.WordPair.AlignmentNotes, Is.EqualTo(new[] {"1", "2", "1", "2"}));
}
示例5: UpdateCognacy_SimilarVowel
public void UpdateCognacy_SimilarVowel()
{
var env = new TestEnvironment("hɛ.lo", "he.ɬa");
env.CognateIdentifier.SimilarSegments.IsMapped(Arg.Any<ShapeNode>(), env.SegmentPool.GetExisting("o"), Arg.Any<ShapeNode>(), Arg.Any<ShapeNode>(),
env.SegmentPool.GetExisting("a"), Arg.Any<ShapeNode>()).Returns(true);
env.UpdateCognacy();
Assert.That(env.WordPair.PredictedCognacy, Is.True);
Assert.That(env.WordPair.AlignmentNotes, Is.EqualTo(new[] {"1", "2", "3", "1"}));
}