public void RemoveLySuffixes_EndingInInglyAndAtProceedsThat_ReplacesSuffixWithE() { const string word = "luxuriated"; var stemmer = new SnowballPorterStemmer(); // Act var actual = stemmer.Step1BRemoveLySuffixes(word, stemmer.GetRegion1(word)); // Assert Assert.AreEqual("luxuriate", actual); }
public void RemoveLySuffixes_EndingInIngAndDoubledLetterProceedsThat_RemovesDoubledLetter() { const string word = "hopping"; var stemmer = new SnowballPorterStemmer(); // Act var actual = stemmer.Step1BRemoveLySuffixes(word, stemmer.GetRegion1(word)); // Assert Assert.AreEqual("hop", actual); }
public void RemoveLySuffixes_EndingInEedlyAndInR1_ReplacesSuffixWithEe() { const string word = "inbreedly"; var stemmer = new SnowballPorterStemmer(); // Act var actual = stemmer.Step1BRemoveLySuffixes(word, stemmer.GetRegion1(word)); // Assert Assert.AreEqual("inbree", actual); }
public void RemoveLySuffixes_EndingInEdAndDoesNotContainVowel_LeavesWord() { const string word = "fred"; var stemmer = new SnowballPorterStemmer(); // Act var actual = stemmer.Step1BRemoveLySuffixes(word, stemmer.GetRegion1(word)); // Assert Assert.AreEqual("fred", actual); }
public void RemoveLySuffixes_EndingInIngAndIsShortWord_ReplacesSuffixWithE() { const string word = "hoping"; var stemmer = new SnowballPorterStemmer(); // Act var actual = stemmer.Step1BRemoveLySuffixes(word, stemmer.GetRegion1(word)); // Assert Assert.AreEqual("hope", actual); }
public void GetRegion1_WithWordContainingRegion1AndRegion2_ProvidesCorrectRangeForRegion1() { // Arrange const string word = "beautiful"; var stemmer = new SnowballPorterStemmer(); // Act var actual = stemmer.GetRegion1(word); // Assert Assert.AreEqual(5, actual); }
public void GetRegion1_WithWordContainingNeitherRegion_ProvidesRangeWithLength0() { // Arrange const string word = "beau"; var stemmer = new SnowballPorterStemmer(); // Act var actual = stemmer.GetRegion1(word); // Assert Assert.AreEqual(0, actual - word.Length); }